Database - Introduction to SQL - Discussion

Discussion :: Introduction to SQL - General Questions (Q.No.27)

27. 

To sort the results of a query use:

[A]. SORT BY.
[B]. GROUP BY.
[C]. ORDER BY.
[D]. None of the above is correct.

Answer: Option C

Explanation:

No answer description available for this question.

Rabindra said: (Apr 7, 2017)  
Why we use GROUP BY in SQL?

Describe in detail.

Shubham said: (Aug 10, 2017)  
GROUP BY in SQL is used to apply conditions on the columns.

For example, if you want to find the numbers of Names which are occurring more than 100 times in a Name column of the Student table, then condition must be applied on the column.

i.e.
SELECT ID, Name
FROM Student
GROUP BY (Name)
HAVING count(Name) >= 100;

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.