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
How do I access sql anywhere database?
What is the max nvarchar size?
What is a pdo connection?
How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?
How to display the records between two range in Oracle SQL Plus?
How many types of relationship are there?
How do you delete a table?
What is a subquery in sql?
what are all the common sql function? : Sql dba
How do you bind variables in pl sql?
what are different types of collation sensitivity? : Sql dba
Explain the difference between drop and truncate commands in sql?
what is the difference between char_length and length? : Sql dba
What is materialized view. What are different methods of refresh?
Explain some predefined exceptions.