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


Please Help Members By Posting Answers For Below Questions

What pl/sql package consists of?

636


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

552


What is normalization? How many normalization forms are there?

552


What is parallel hint?

746


What is nvarchar in sql?

520






What are variables in pl sql?

561


What is an inner join sql?

542


What is the use of desc in sql?

492


What is data type in sql?

554


What is the sql case statement?

574


How do I order by ascending in sql?

535


How many sql commands are there?

673


what is foreign key? : Sql dba

585


How much does sqlite cost?

553


What is the difference between the conventional and direct path loader? : aql loader

648