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
Why functions are used in sql?
How do I write a cron which will run a sql query and mail the results to agroup?
How do you know if a relationship is 2nf?
What is sql*plus?
what are the authentication modes in sql server? : Sql dba
how do you tune the slow running queries in oracle db , explain the methodology
What is the difference between clustered and non-clustered index in sql?
What are the parts of a basic sql query?
What does pl sql developer do?
How to use boolean type in select statement?
Explain the purpose of %type and %rowtype data types with the example?
What's the difference between a primary key and a clustered index?
What is forward declaration in pl sql?
how to calculate the difference between two dates? : Sql dba
what is the syntax for using sql_variant_property? : Transact sql