oracle11g - SQL Group by clause count of a specific column -
hello have table structure this
id name weight status 1 10kg c 2 10kg f 3 c 20kg f
i have query say
select name,weight,count(*) "total" sampletable group name,weight
by query can
name weight total 10kg 2 b 20kg 1
but want
name weight total status_with_c 10kg 2 1 b 20kg 1 1
i want count of status, have tried union , subquery no avail please me in regard , using oracle 11g.
Comments
Post a Comment