I'm searching a SQl query that gives me all values that have their max() at a certain time.
This is my simplified table:
+---------+-------+-------+
| name | value | month |
+---------+-------+-------+
| joe | 10 | jan |
| olivia | 300 | jan |
| tim | 10 | jan |
| joe | 100 | feb |
| olivia | 50 | feb |
| tim | 100 | feb |
+---------+-------+-------+
This is how I would describe my query:
SELECT name FROM table WHERE MAX(value) is in 'jan'
This should be my result:
olivia
Best Joerg