MySQL Forums
Forum List  »  General

Re: Doubt on a query
Posted by: Peter Brawley
Date: February 19, 2021 12:23PM

update fichaclientes f
join (
  select user_id, max(day) as lastday
  from calendar
  group by user_id
) c using(user_id)
set f.last_day = c.lastday;

Options: ReplyQuote

Written By
February 19, 2021 09:11AM
Re: Doubt on a query
February 19, 2021 12:23PM
February 22, 2021 03:02AM
February 22, 2021 03:13AM
February 22, 2021 11:03AM
February 22, 2021 11:09AM
February 22, 2021 09:33PM
February 23, 2021 06:48AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.