Time slot count in mysql table
My Table Data
ID Start_Time End_Time Count(10mins slot)? Count(20mins slot)?
1 9:00 AM 9:45 AM
2 9:10 AM 10:00 AM
I would like to find how many 10 mins.( like 9:00-9:10, 9:10-9:15 and so on..) and 20 mins. slots are available for each row
Dont know how to get this with a query, can any one help?
select id,
start_time,
end_time,
timestampdiff(MINUTE, end_time, start_time) DIV 10,
timestampdiff(MINUTE, end_time, start_time) DIV 20
精彩评论