MySQL Forums
Forum List  »  General

Re: Doubt on a query
Posted by: Peter Brawley
Date: February 22, 2021 09:33PM

update Ficha_Cliente f 
join ( 
  select id_utente, max(data) as lastday 
  from Calendario 
  WHERE presente=1 
    AND activo=1 
    AND id_cliente=9263 
    AND data<='2021-02-21' 
  group by id_utente
) c on f.id=c.id_utente 
set f.ultima_presenca = c.lastday;

Options: ReplyQuote


Subject
Written By
Posted
February 19, 2021 09:11AM
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
Re: Doubt on a query
February 22, 2021 09:33PM
February 23, 2021 06:48AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.