Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Avoid Group By

AJ.MMay 17 2011 — edited May 18 2011
Hello,

My Database Version - 10g


I have one Query
--------------------------------------------------------------------------------------
SELECT 'Emp Count' TYPE,
max(decode(emp_location,'Mumbai',COUNT(*))) Mumbai ,
max(decode (emp_location,'Kota',COUNT(*))) Kota,
max(decode(emp_location,'Delhi',COUNT('Delhi'))) Delhi,
max(decode(emp_location,'Gurgaon',COUNT(*)))Gurgaon FROM emp_dtls
group by emp_location

--------------------------------------------------------------------------------------

This is working fi9 ..but how can i write this without using Group by ...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2011
Added on May 17 2011
20 comments
9,782 views