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
Explain what is a database?
How is use pl and sql?
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
What is posting?
What's the difference between a primary key and a clustered index?
Which data dictionary views have the information on the triggers that are available in the database?
explain mysql aggregate functions. : Sql dba
Is sql the best database?
In what condition is it good to disable a trigger?
How to run sql commands in sql*plus?
What does partition by mean in sql?
What are all the common sql functions?
Where is sql database stored?
What are different types of statements supported by sql?
How do I count records in sql?