We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
IP
HOME-WORK
1. By default , order by clause lists the result in __________ order.
2. Which would arrange the rows in ascending order in sql? 3. To create summary result,_____ clsude is used. 4. Consider the following query Select*from employee order by salary ________,name______; To display the salary from greater to smaller and name in alphabetical order .what should be use? 5. Select the correct sql query from below to find the temperature in increasing order of all cities. a) Select city from weather order by temperature; b) Select city,temperature from weather; c) Select city , temperature from weather order by temperature d) Select city , temperature from weather order by city; 6. With sql, how can you return the number of not null records in project field of “stuent” table? a. Select count(project) from student ; b. Select column(project) from student; c. Select columns(*) from student d. Select count(*) from student 7. Which of the following is not an aggregate function? a) Avg b) Sum c) With d) Min 8. The having clause does which of the following? a) Acts exactly like a where clause b) Acts like a where clause bit is used for columns rather than groups. c) Acts like a where clause but is used for groups rather than rows. d) Acts like a where clause but is used for rows rather than columns. 9. Aggregate functions can be used in the select list or the _________clause of a select statement . they cannot be used in a _____ clause. 10. Which clause is used with “aggregate functions”? a. Group by b. Select c. Where d. Both a & b 11. Columns can be sorted in descending sequence by using the sql keyword__________ . 12. The sql built-in function ___________ total values in numeric columns. 13. The sql built-in function ___ computes the average of values in numeric columns. 14. The sql built-in function _______ computes the numner of rows in a table. 15. The select clause _______ is used to collect those rows that have the same value in a specified column. 16. With group by queries,_________ functions are used. 17. The rows of the result relation produce by a select statement can be stored , but only one column.(T/F) 18. The having clause acts like a ehere clause, but it identifies groups that meet a criterion , rather than rows.(T/F) 19. Distinct and its counterpart,all ,can be used more than once in a select statement .(T/F) 20. Sum,avg,min,and max can only be used with numeric columns.(T/F). 21. Order by can be combined with the select statements. 22. Assertion and reason a) A- the order by clause of select statement is carried out in the lat after executing other clause of the select statement. R- the order by clause is carried out on the final result of the select query. b) A- the group by clause yields summary resukt using group functions. R- the group by clause combines a number of rows in a group and applies functions on it. c) A- both where and having clauses are used for specifying conditions. R- where and having clauses of the select query can be used interchangeably. d) A- both where and having clause are used for specifying conditions. R- the where condition is applicable on individual rows and having condition is applicable on a group of rows. 23. The sql select provides clauses for sorting data and for summarizing result.write the name of clause for these. 24. What is the significance of group by clause in a sql query? 25. What is the difference between a where clause and a having clause of sql select statement? 26. What is the difference between the order by and group by clause when used alongwith the select statement?explain with an example. 27. Which sql aggregate function is used to count all records of a table? 28. Write a query to display the difference of highest and lowest salary of each department having maximum salary >4000. 29. Question on page no :- 405 (que 13) 30. Question on page no :-406(que 18) 31. Question on page no :- 407(que 19) 32. Question on page no :- 407(que 20) 33. Question on page no :- 408 (que 21) 34. Question on page no :- 409(que 22) 35. Question on page no :- 409(que 23) 36. Question on page no :- 410 (que 24) 37. Question on page no :- 411 (que 25) 38. Question on page no :- 411 (que 26) 39. Question on page no :- 412 (que 27) 40. Question on page no :- 413 (que 28)