Skip to content
Advertisement

SUM() with the Max Column and Fixed Column Value if exists

I want to get the sum of these records, the condition is keep status=Processing if it exists in the records and the Latest UploadedOn with its corresponding UploadedBy

Currently I only get the sum(RecordDate) with the Max(UploadedOn) using this query

And my wanted output is with

Advertisement

Answer

Use Windows functions this way :

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement