dimanche 24 juillet 2016

Sub Query SQL to display grouping, count, put it on up

I have one table on database

No  |  Nomor ID  | Name   | chairman (if as chairman id=1, if not = 0)
1   | 1234       | Brian  | 1
2   | 1234       | Dol    | 0
3   | 5555       | Mon    | 0
4   | 5555       | Tue    | 1
5   | 5555       | Nom    | 0

I want to, display it with

Nomor ID |  Name | Chairman | count 
1234     | Brian |     1    |  2
5555     | Tue   |     1    |  3

I was try any possibilities.. but can't , to display "name" put on it like that

May you know solution

Aucun commentaire:

Enregistrer un commentaire