How to use aggregate function with a case statement and a where condition – Mysql
I am trying to get max(level) and sum(hours) until someone reaches level 5 for the first time. This is my input date level hours 1/1/2021 1 1 1/2/2021 2 1 1/3/2021 2 2 1/4/2021 3 1 1/5/2021 4 1 1/6/2021…