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
sysdate varchar2(10):= ‘Today’;
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.