Hi,
I have a problem. I need to join two tables with a query. A need all information from table 1 and Value for every ID from table 2 - but only from max available year.
How to do it?
Table 1
Table 2
I have a problem. I need to join two tables with a query. A need all information from table 1 and Value for every ID from table 2 - but only from max available year.
How to do it?
Table 1
id | name |
1 | A |
2 | B |
3 | C |
4 | D |
5 | E |
Table 2
id | year | value |
1 | 2020 | 100 |
1 | 2019 | 50 |
1 | 2018 | 0 |
2 | 2019 | 200 |
2 | 2018 | 100 |
3 | 2015 | 300 |