Can we use ROw_Number or DENSE_RANK function here?
SELECT date,
ROW_NUMBER(total_consumption) OVER ( PARTITION BY date) as ranking
FROM joined
WHERE ranking = 1
3 answers ( 0 marked as helpful)
yes
Yes
No
SELECT date,
ROW_NUMBER(total_consumption) OVER ( PARTITION BY date) as ranking
FROM joined
WHERE ranking = 1
yes
Yes
No