Skip to content
Advertisement

Take maximum time during update left join mysql

I am doing an update left join on ID and receiver.

How can I make the query to pick the record with max time taken?

Expected output :

Advertisement

Answer

I have added another column (id_primary) in right_table. To get the maximum use this subquery (select id_primary from right_table order by time_taken desc limit 1) at end

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement