It has been a long time since we ran quiz. So let us get ready for a quiz. The quiz has two parts. You have to get both the parts correct to win Quadcopter with Camera (we will call it drone). We will be giving away a total of 2 Quadcopters.
The quiz is extremely easy and I will ship the Drone anywhere in the world where Amazon will ship it.
Let us jump directly to the quiz. Please complete all the three questions of the contest.
Contest Part 1: Brain Teasers
There are two questions for you in this part of the contest.
Question: There are two 7s. How will you write select statement with a single operator that returns single 7?
Hint: SELECT 7(Answer)7
Question: Write down the shortest code that produces 1 without using any numbers in the select statement?
Hint: SELECT (Answer)
Contest Part 2: Download and Activate Rapid SQL
Question: Download and Activate Rapid SQL.
Hint: You have to download and activate Rapid SQL. If you do not activate Rapid SQL, you will be disqualified for the contest. Why take risk, let us start!
That’s it!
Just answer above questions in the following comments area, in following format.
Remember:
- Use comments area right below the blog to take participation in the contest
- Answer before June 5, 2014 midnight GMT.
- The winner will be announced on June 8.
- The winner will be selected randomly from all the valid answers.
- All the valid answers will be kept hidden till June 5, 2014.
- There will be a total of two winners.
- The contest is open for any country of the world where Amazon ships products.
Reference: Pinal Dave https://blog.sqlauthority.com/ )
163 Comments. Leave new
answer 1:- select CASE WHEN(7 !=”) then 7 END
answer 2:- select COUNT(‘A’)
Ans 1: Select 7&7
Ans 2: Select Count(*)
Contest Part 1: Brain Teasers
Q1 : Answer : select 7&7
Q2 : Answer : select count(*)
Contest Part 2: Download and Activate Rapid SQL
Download and Activated Rapid SQL.
Answers to the questions asked in the contest:
Answer for Question 1: Select 7|7
Answer for Question 2: SELECT ISNUMERIC(CAST(” AS INT))
Answer1
SELECT 7 | 7
Result :
(No column name)
7
Answer2
SELECT count(*)
Result :
(No column name)
1
select 7 as ‘7’
select @@ROWCOUNT
I downloaded Rapid SQL
Activated
Answer 1. select 7&7
Answer 2. select count(*) or select len(‘a’)
Hello sir,
I have done with the last step of Rapid SQL. I have register with it. Rapid SQL looks awsome pinal sir.
Ans 1 : SELECT 7&7
Ans 2 : SELECT EXP($)
Answer for Quiz
1. select 7 & 7
2. Select EXP($)
Hi Pinal,
Contest Part 1: Brain Teasers
Answer 1: Bitwise AND operator ‘&’
SELECT 7 & 7
Note: I can get the same answer using Bitwise OR operator ‘|’
Answer 2: Find the length of any single character specified in string expression
SELECT LEN(‘A’)
Note: I can use other string functions to get the desired answer but this is the shortest code.
Contest Part 2: Download and Activate Rapid SQL
Answer: Downloaded and activated Embarcadero product Rapid SQL XE5 Trial (8.6.1, 32-bit).
Kind Regards,
Hitesh Shah
Select 7&7
Select count(*)
Result???
Answer for Q1 – select ‘7’ AS [7]
Answer for Q2 – select COUNT(*)
select 7 | 7
Select Count(”)
Hi Pinal, I could nt see my comments??
Can you check whether they are posted and i could not find those? i Have posted those with kmk391@gmail.com
I have posted the right answers and also activated rapid sql that day. I guess its on 2,3 june 2014
[word removed].. i think they are not posted..!!
Hi,
Contest over?Please provide the right answer
Hi Dave,
Has the Winners announced ???
SELECT 7&7
SELECT Count(*)