Sql Interview Questions & Answers: part5



Sql Interview QUESTIONS AND ANSWERS :: part5 : 6 to 10

Following SQL Multiple choice objective type questions and answers will help you in many software compnaies written examinations and inteview 2015 :

6.Which of the following is not a aggregate function ?

Avg
Sum
With
Min

7.Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);

8.Find all the tuples having temperature greater than ‘Paris’.

SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = ‘Paris’
SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = ‘Paris’)
SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = ‘Paris’)
SELECT * FROM weather WHERE temperature > ‘Paris’ temperature

9.SQL query to find the temperature in increasing order of all cities.

SELECT city FROM weather ORDER BY temperature
SELECT city, temperature FROM weather
SELECT city, temperature FROM weather ORDER BY temperature
SELECT city, temperature FROM weather ORDER BY city

10.SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.

Group by
With
Where
Having

More Sql Interview QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Opportunity is missed by most people because it is dressed in overalls and looks like work.- Thomas Edison