Monday, August 19, 2013

mysql time between same id ticketing system

mysql time between same id ticketing system

im using ticketing system, and need to create query to check agent are
they late with their delivery
this is what i have and what i need
i have: ticket_id time_created i need select all same ticket_id where
time_created between 2 is greater then 24 hours
example
ticket_id time_created
1 2013-08-19 12:11
1 2013-08-17 12:07
1 2013-08-17 12:00
2 2013-08-19 12:11
2 2013-08-19 12:10

result
ticket_id time_difference
1 48:04

No comments:

Post a Comment