I'm using Postgres v>9.
I'd like to get values of a table like this:
id year value
1 2015 0.1
2 2015 0.2
6 2030 0.3
6 2015 0.4
6 2017 0.3
The idea is to get lines where years is < 2019 or year = 2030. If id is repeated, I´d like to get only 2030 line, not 2015 ones, that is, the result I´m looking for is:
id year value
1 2015 0.1
2 2015 0.2
6 2030 0.3
How can I do that?