is it necessary to write group by and order by clause together
Answer Posted / 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 |
Post New Answer View All Answers
What is sql and explain its components?
How do you respond to dementia behavior?
How do I partition a table in sql?
Are sql database names case sensitive?
What is trigger and types?
What is a temp table?
Are stored procedures compiled?
What is replication id?
Does sqlite need a server?
How do I run sql?
What is schema in sql example?
Why we use join in sql?
What is the purpose of the sql select top clause?
Which is better cte or subquery?
Can %notfound return null after a fetch?