The Great Oracle SQL Quiz – your chance to get grilled at Open World (S290735) – two sample questions

5

Next week, I am doing two presentations at Oracle Open World, both on Thursday. One is on ADF – more on that later. The other one is The Great Oracle SQL Quiz, with 15 brain teasers, mind warpers and soul searching questions on SQL and PL/SQL. It’s the Quiz that Alex (Nuijten) and I have been doing in various locations in Europe and the US for the past three years. The quiz that Steven Feuerstein recently participated in, describing it afterwards as ‘hilarious’. While we focus on fun, and there is a real winner who gets a real prize, the quiz is also a great opportunity to learn about some fairly useful and relatively unknown features. Well, anyway, if you are in the area, come along and play along. It’s session S290735 – Thursday, 8.30-9.30 pm, Hilton Continental Ballroom 5.

So what does a typical question look like? For example a little like this one:

1. The intelligent datebase

In SQL*Plus, the following could be be seen:

 

What has been done just prior to this statement? ....

A)  alter system set sysdate = NLS_FRIENDLY

B)  declare
      sysdate varchar2(10):= ‘Today’;
    begin

  
C)  alter system set NLS_DATE_FORMAT=’RELATIVE’ 
 
D)  update dual set sysdate =’TODAY’

 

Or a somewhat more complex question like this one:

2. Historical Aggregation 

Here we see the employees and their salaries. That is the current situation. We see nothing about the past. And we would like to answer the question: "Who has received the biggest payraise in history?" (biggest both as a percentage and an absolute number).

Which database feature do you think we can best employ for answering that question?

A. The supplied package DBMS_LOGMNR

B. Aggregate Change Index

C. Flashback Versions Query

D. Materialized View in combination with After Update Row trigger

 

You will see the answers with the complete code for the second questions in a blog article to appear later today. 

Share.

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director for Fusion Middleware. Consultant, trainer and instructor on diverse areas including Oracle Database (SQL & PLSQL), Service Oriented Architecture, BPM, ADF, Java in various shapes and forms and many other things. Author of the Oracle Press book: Oracle SOA Suite 11g Handbook. Frequent presenter on conferences such as JavaOne, Oracle OpenWorld, ODTUG Kaleidoscope, Devoxx and OBUG. Presenter for Oracle University Celebrity specials.

5 Comments

  1. Hi Laurent.
    Will you participate in the Quiz? Seems like you are a serious candidate for the finals. However, you will have to stick to answers we provide, no matter how many more you can think of… Will we meet on Sunday? Anyways, hope to run into you next week.
    best regards, Lucas