Home > database >  SQL statements for help
SQL statements for help

Time:09-23

To the great god for help ~ ~
I want to ask when the line 11 C_C to C_J (a total of 30 column,,,) is equal to 6094 in the fourth row C_C column to C_J column (a total of 30 column,,,), and also a great god, please help, thank you!

CodePudding user response:

You ask what problem not understand

CodePudding user response:

Select a case when (C_C + C_D +... + C_J=6094) then
(select C_C + C_D +... + C_J from t1 where id=4)
The else 0 end "useful" from t1 where id=11
  • Related