1,08:00,100
1 09:00 50
2 08:00 70
4 10:00 400

se vuoi vedere la somma della cassa 1

select sum(totale) from tua_tab where cassa = 1

se vuoi vedere tutte le ore della cassa 1 e il totale a quell'ora

select cassa,ora,(select sum(totale) from tua_tab where cassa = 1 and ora = tua_tab.ora ) as somma_ora_cassa1 from tua_tab where cassa = 1

"non testata"