I have a query
select
event_time, argument
from
mysql.general_log
where
argument <> 'SHOW WARNINGS'
order by
event_time;
and I was wondering if it is possible to add a column that would say what the time diff between rows would be for each row?
Similar to Getting the Delta between the rows on SQL and time difference between two rows - mysql (uses PHP) by for using only SQL in MySQL (no PHP)
You can use
lag()
:In older versions of MySQL, you can use: