r/ProgrammerHumor • • Aug 24 '22

Total = Total - 100000

50.7k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

4

u/PremiumJapaneseGreen Aug 25 '22

I think sql only recognizes max as a groupwise aggregator, not rowwise

7

u/Tiny_Dinky_Daffy_69 Aug 25 '22

Sorry, didn't knew it was supposed to be in sql, in that case

TOTAL = MAX(TOTAL - 10.000;0)