Avatar of Robert Francis
Robert Francis

asked on 

Query table for min date and unique user in SQL SERVER

Here is my table

Job | Price | Changed By | Date

1 |100 | Bill  | 2016/08/01
1 |100 | Bob| 2016/08/02
1 |100 | Susan| 2016/08/03

2 |222 | Bill | 2016/08/01
2 |222 | Bob| 2016/08/02
2 |222 | Bill | 2016/08/03
2 |222 | Bob| 2016/08/04

3 |176 | Susan| 2016/08/01
3 |176 | Bill | 2016/08/02
3 |176 | Susan| 2016/08/03

What I want is the job, price and changed by for record with the minimum date. The results I would like to see is:

1 |100 | Bill  | 2016/08/01
2 |222 | Bill | 2016/08/01
3 |176 | Susan| 2016/08/01

Thanks in advance for your help
Microsoft SQL Server

Avatar of undefined
Last Comment
Pawan Kumar

8/22/2022 - Mon