I have the following table:
Use distinct on:
distinct on
select distinct on (day) t.* from t order by day, val desc;
2.1m questions
2.1m answers
60 comments
57.0k users