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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -