Hi team,
How can I get a distinct ID and date from 2nd table (based on ID Column we need to get max date for each ID)?
Table one |
|
|
Table two |
ID |
|
|
ID |
Date |
1 |
|
|
1 |
8/6/2020 |
2 |
|
|
1 |
7/6/2020 |
3 |
|
|
2 |
8/6/2020 |
4 |
|
|
2 |
7/6/2020 |
5 |
|
|
3 |
8/6/2020 |
6 |
|
|
3 |
7/6/2020 |
7 |
|
|
4 |
8/6/2020 |
8 |
|
|
4 |
7/6/2020 |
9 |
|
|
5 |
8/6/2020 |
10 |
|
|
5 |
7/6/2020 |
|
|
|
6 |
5/6/2020 |
|
|
|
6 |
4/6/2020 |
|
|
|
7 |
5/6/2020 |
|
|
|
7 |
4/6/2020 |
|
|
|
8 |
5/6/2020 |
|
|
|
8 |
4/6/2020 |
|
|
|
9 |
3/6/2020 |
|
|
|
9 |
2/6/2020 |
|
|
|
10 |
3/6/2020 |
|
|
|
10 |
2/6/2020 |
Sample output:
1 |
1 |
8/6/2020 |
2 |
2 |
8/6/2020 |
3 |
3 |
8/6/2020 |