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 is the starting oracle error number?

753


How many types of keys are there in sql?

756


Explain unique key in sql.

738


How do you select unique values in sql?

703


Is pl sql different from sql?

717






Can I call a procedure inside a function?

736


What is a sql schema used for?

729


How does an execution block start and end in pl sql?

674


Define select, insert, create, delete, update, drop keywords

776


How many functions are there in sql?

719


What is flag in sql?

738


What has stored procedures in sql?

779


Can we rollback truncate?

719


Explain scalar functions in sql?

772


Can you selectively load only those records that you need? : aql loader

772