I got a table with number, blood group and name. I need the output like Blood Group Count B+ 36 A 33 O- 12 Can a single sql query do the thing?