79789284

Date: 2025-10-13 12:48:45
Score: 2
Natty:
Report link

You want to try out this?

SELECT
  Columna,
  Columnb,
  Columnc,
  CASE
    WHEN (SELECT SUM(*) FROM YOURTABLE WHERE Columnb between 1 and Columnb - 1) < 6000 THEN Columnc
    ELSE (SELECT 6000 - SUM(*) FROM YOURTABLE WHERE Columnb between 1 and Columnb - 1)
  END AS Columnd
FROM YOURTABLE;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Bending Rodriguez