If you are a regular reader of this blog – you will find no issue at all in resolving this puzzle. This contest is based on my experience with NuoDB.
If you are not familiar with NuoDB, here are few pointers for you.
- Step by Step Guide to Download and Install NuoDB – Getting Started with NuoDB
- Quick Start with Admin Sections of NuoDB – Manage NuoDB Database
- Quick Start with Explorer Sections of NuoDB – Query NuoDB Database
In today’s contest you have to answer following questions:
Q 1: Precision of NOW()
What is the precision of the NuoDB’s NOW() function, which returns current date time?
Hint: Run following script on NuoDB Console Explorer section:
SELECT NOW() AS CurrentTime FROM dual;
Here is the image. I have masked the area where the time precision is displayed.
Q 2: Executing Date and Time Script
When I execute following script –
SELECT 'today' AS Today, 'tomorrow' AS Tomorrow, 'yesterday' AS Yesterday FROM dual;
I will get the following result:
NOW – What will be the answer when we execute following script? and WHY?
SELECT CAST('today' AS DATE) AS Today, CAST('tomorrow' AS DATE) AS Tomorrow, CAST('yesterday'AS DATE) AS Yesterday FROM dual;
HINT: Install NuoDB (it takes 90 seconds).
- 2 Amazon Gifts
- 2 Limited Edition Hoodies (US resident only)
- Please leave an answer in the comments section below.
- You must answer both the questions together in a single comment.
- US resident who wants to qualify to win NuoDB apparel please mention your country in the comment.
- You can resubmit your answer multiple times, the latest entry will be considered valid.
- Last day to participate in the puzzle is June 24, 2013.
- All valid answer will be kept hidden till June 24, 2013.
- The winner will be announced on June 25, 2013.
- Two Winners will get USD 25 worth Amazon Gift Card. (Total Value = 25 x 2 = 50 USD)
- The winner will be selected using a random algorithm from all the valid answers.
- Anybody with a valid email address can take part in the contest.
Reference: Pinal Dave (http://blog.sqlauthority.com)