Probleme de group by

Fermé
amsy10 - 27 janv. 2012 à 20:00
Bonjour,

je desire group les donnne par rapoort a la première colonne
j 'ai essaye ce ci
7


Select substr(heure,1,2) as heures,count(*),sum(duree) from call.12 where (chp12=0 and chp11=0 and (length(Bnum)>2)and location like "224%" ) and date=20111231 and heure between '000000' and '235959' group by heure order by heure ;

heures sum(*) sum(duree)
| 22 | 14 | 446 |
| 22 | 16 | 535 |
| 23 | 17 | 1412 |
| 23 | 21 | 683 |
| 23 | 16 | 615 |
| 23 | 15 | 1151 |
| 23 | 13 | 1022 |


Merci d 'avance