Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 sql and explain its components?

1009


How do you respond to dementia behavior?

926


How do I partition a table in sql?

1045


Are sql database names case sensitive?

937


What is trigger and types?

968


What is a temp table?

950


Are stored procedures compiled?

873


What is replication id?

886


Does sqlite need a server?

995


How do I run sql?

1096


What is schema in sql example?

1091


Why we use join in sql?

917


What is the purpose of the sql select top clause?

1021


Which is better cte or subquery?

970


Can %notfound return null after a fetch?

1005