In this article, we will talk about Important QnA GroupBy OrderBy Class 12. As we have seen the topic in detail in the previous article MySQL Queries IP Class 12. Let us start!

QnA GroupBy OrderBy Class 12

As usual, we will start the Important QnA GroupBy OrderBy Class 12 session with objective type questions of 1 marks, that consists of fill in the blanks, true/false or MCQs.

Objective Type Questions

  1. The ______ clause combines all records from a particular field of a table.
  2. You can use group by with a column name with ________ functions to display the results for each group.
  3. Which of the following clause applies conditions on the group by results?
    1. where
    2. having
    3. group by
    4. order by
  4. Order by clause is used to sort the results in the ascending or descending order. (True/False)
  5. You cannot use multiple group by clause in a query. (True/False)
  6. The ____________ clause have either simple boolean expression or use aggregate function with a condition.
  7. The order by clause display the results in ascending order by default. (True/False)
  8. The ________ keyword is required to display the results in descending order.
  9. Select the correct option to display the records in increasing order of the country column from the table population:
    1. select population, country from population in increasing order to country;
    2. select population, country from population increasing order by country;
    3. select population, country from population order by country;
    4. select population, country from population where order by country;
  10. Which of the following statement is correct for having clause?
    1. It is exactly as similar as where clause
    2. It works only on columns not on groups
    3. It works only on rows not on column groups
    4. It works on column groups
  11. You can use having and where clause together in MySQL statement. (True/False)
  12. The group by clause always comes before order by clause in the SQL statement if both used in SQL statement. (True/False)
  13. You have to use the column in both select and group by clause to group the results. (True/False)
  14. Which of the following word is used to display the result in descending order?
    1. descending
    2. reverse
    3. dsc
    4. desc
  15. You cannot where and order by clause in a single SQL statement. (True/False)

Let us have a look on the answers of objective type questions for our article Important QnA GroupBy OrderBy Class 12.

  1. group by
  2. aggregate
  3. b) having
  4. True
  5. True
  6. having
  7. True
  8. desc
  9. c) select population, country from population order by country;
  10. d) It works on column groups
  11. True
  12. True
  13. True
  14. d) desc
  15. False

In the next section of Important QnA GroupBy OrderBy Class 12, we will discuss the short answer questions.

Short Answer questions

  1. What do you mean by group by clause?
  2. What is the significance of having clause in SQL statement?
  3. How you can use group by clause?
  4. Ms. Sandhya is working on a table named customers. She wants to count the customer according to their category, she wrote following statement, but not getting proper result, help her to resolve the problem and get the proper output: select category, count(*) from customers;
  5. Mr. Kartik is wanted to show the results of employees according to the each city. Suggest him the proper SQL statement.
  6. Ms. Manisha is working on a table and want to display the students who scored more than 85% marks in science stream. Write a SQL command to do this.
  7. How to display the employees who are earning more than 1200 from each department?
  8. How you can display non-group expression using group by clause?
  9. What is the use of order by in SQL statement? Explain with example.
  10. Write SQL statement to display all the employees records in increasing orders of names.

Informatics Practices Class 12

That’s all from the Important QnA GroupBy and OrderBy Class 12. Try to write the answers yourself. If you have any doubt, leave your comments.

Don’t forget to hit the like button if you enjoyed the article Important QnA GroupBy and OrderBy Class 12.

We will cover the queries part and practical questions for Important QnA GroupBy and OrderBy Class 12 in the practical session.

Thank you for visiting our blog.

2 thoughts on “Important QnA GroupBy OrderBy Class 12”

Leave a Reply