Please help me with an equivalent query in mySQL for the below:
There is a table called "proj_table" Based on cycle_id, i need to find the current and previous value for each column for a project
SELECT project_id , cycle_id ,final_value duration,
Lead(final_value) OVER (partition by project_id ORDER BY project_id desc, cycle_id desc) AS prev_final_value,
Lead(duration) OVER (partition by project_id ORDER BY project_id desc, cycle_id desc) AS prev_duration,
Lead(cycle_id) OVER (partition by project_id ORDER BY project_id desc, cycle_id desc) AS prev_cycle_id
FROM proj_table