I have single table called flow, which has every 10 mins flow sample. I want to show sum of this samples per shift like 8am to 4pm shift1, 4pm to 12am shift2, 12am to 8am shift3 | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

I have single table called flow, which has every 10 mins flow sample. I want to show sum of this samples per shift like 8am to 4pm shift1, 4pm to 12am shift2, 12am to 8am shift3

how to collect data like date shit1 shift2 shift3 1.4.15. 35. 39. 65 2.4.15 likewise

22nd Aug 2015, 5:12 AM
hari Prasad
hari Prasad - avatar
2 Respuestas
0
Normalise the tables. Include 'shift_id 'column in your flow table. create another table named "Shift" which should contain columns (Shif , start_time, end_time). e.g : Shift Table shift_id | start_time | end_time | Shift 1 | 8am | 4pm | Shift 2 | 4am | 12pm | Shift 3 | 12am | 8am | Query : select sum(sample) from flow group by shift_id; OR select sum(f.sample), s.start_time, s.end_time from flow f JOIN shift s ON(f.shift_id=s.shift_id) group by f.shift_id;
25th Sep 2015, 7:14 AM
Pravin Lonka
Pravin Lonka - avatar
0
pls help me how to use flowchart
23rd Jun 2016, 11:04 PM
December ten
December ten - avatar