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
Hi Pinal,
Below are the answers for the questions
1) Select 7|7
2) Select convert(bit,’true’)
1.Question: There are two 7s. How will you write select statement with a single operator that returns single 7?
Ans : SELECT 7 & 7
2.Question: Write down the shortest code that produces 1 without using any numbers in the select statement?
Ans : SELECT CEILING(RAND())
Ques 1 Select 7#7
Ques 2 Select Len(‘A’)
1) Ans : SELECT 7|7
2) Ans : SELECT COUNT(*)
Hello Sir,
I have given answer in the comment and activated Rapid SQL. Can you confirm my candidature for the contest?
Question 1 Ans : select 7|7
Question 2 Ans : select COUNT(‘a’)
Hi,
first answer is:
select 7 & 7
— or:
select 7 | 7
second answer is:
select COUNT(*) from (select ‘a’ as a) as a
Contest Part 1: Brain Teasers
Answer1: SELECT 7|7
Answer2: SELECT LEN(‘A’)
Answer Number 1 : SELECT 7|7
Answer Number 2 : SELECT 1
Select 7 & 7
Select COUNT(‘a’)
SELECT 7 INTERSECT 7
Answer for question 1:
select 7|7
Answer for question 2:
select day($)
These are the answers..
SELECT count(*)
select 7 PRINT 7
The answers are
SELECT 7&7
SELECT @@ROWCOUNT
I have activated RapidSQL with my email id bhatnitinn@gmail.com
Following are answers –
1) SELECT 7 | 7
2) SELECT count(‘a’)
why my comment says..”Your comment is awaiting moderation.”
Hi, here my answer
–Question 1
SELECT 7 & 7
–Question 2
SELECT LEN(‘.’)
thx :)
1. Ans : & operator (7 & 7)
2. Ans : Count(@@version)
Hi Pinal,
My answer is as below:
Question: There are two 7s. How will you write select statement with a single operator that returns single 7?
Answer : Select 7 | 7
Question: Write down the shortest code that produces 1 without using any numbers in the select statement?
Answer: Select count (”)
And I have also installed Rapid SQL.
Thanks,
Prabhat
Contest Part 1:
Answer for Question 1: bitwise AND operator and bitwise OR operator gives the same result Select 7&7, Select 7|7
Answer for Question 2: select CONVERT(bit, ‘TRUE’)
Contest Part 2: I have installed and activated the rapid sql.