Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
dd
drop table a8; create table a8(id integer,start datetime,ende datetime); insert into a8(id, start, ende) values (1, '2018-5-15T10:00','2018-5-15T20:44'); insert into a8(id, start, ende) values (1, '2018-5-16T10:00','2018-5-16T20:44'); insert into a8(id, start, ende) values (1, '2018-6-16T10:00','2018-6-16T11:01'); insert into a8(id, start, ende) values (1, '2018-6-17T10:00','2018-6-17T11:01'); insert into a8(id, start, ende) values (1, '2018-7-10T16:00','2018-7-10T17:59'); insert into a8(id, start, ende) values (1, '2018-7-17T16:00','2018-7-17T17:59'); insert into a8(id, start, ende) values (1, '2018-7-18T16:00','2018-7-18T17:59'); insert into a8(id, start, ende) values (1, '2018-8-17T16:00','2018-8-17T17:59'); select sum(time_to_sec(timediff(ende,start))) Sekunden, truncate(sum(time_to_sec(timediff(ende,start)))/3600,0) Stunden, truncate( (sum(time_to_sec(timediff(ende,start))) - truncate(sum(time_to_sec(timediff(ende,start)))/3600,0) * 3600) /60,0) Minuten from a8 group by start,ende
run
|
edit
|
history
|
help
0
Reviews and Permissions
Show Tables
Comparación de Collations general-spanish-latin en MySQL
Amp
universidade_u
vwall
sideboob
delivery_boy
Кутарева Елена
sree..