Jump to content

Obter registos mais recente com query


klasss
Go to solution Solved by antseq,

Recommended Posts

Olá a todos, 

Necessito de uma pequena ajuda para construir uma Query onde vou apenas quero ver cada utilizador com o registo mais recente. 
Exemplo pratico : 
Tabela Ficha : 
ID | ID_user | Data_registo | Valor 
1   | 1           | 01-01-2020  | 2

2   | 2           | 01-02-2021  | 5

3   | 1           | 06-01-2021  | 7

4   | 1           | 01-03-2022  | 8

 

neste exemplo de tabela quero ver apenas o registo mais recente de cada ID_user 
2   | 2           | 01-02-2021  | 5

4   | 1           | 01-03-2022  | 8

existe forma de ir so buscar o mais recente de cada ID_user? 

Obrigado

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.