is it necessary to write group by and order by clause together
Answers were Sorted based on User's Feedback
Answer / suman
No Required.
Group by is grouping the records
but Order by mention the data should be desc or asc order.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / madhav
yes,
select deptno,sum(sal) from emp group by deptno;
(it displays ascending order)
when we want to display the descending order,we need order
by clause and group clause.
select deptno,sum(sal) from emp group by deptno order by
deptno desc
(it displays the descending order)
Is This Answer Correct ? | 9 Yes | 10 No |
what is subquery? : Sql dba
What does the base_object_type column shows in the user.triggers data dictionary view?
What normalization means?
Can we update views in sql?
Main diff between varray and nested tablea
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
What are the advantages of the packages
How do I find duplicates in the same column?
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
What can I use instead of union in sql?
Does oracle use sql?
how to retrieve the top 2 salaried persons from a database?