0

我有表,我只想取列直到>80,根据U1

T1:

User  || C1 || C2 || C3 || C4 || C5 || Total
  U1  || 10 || 20 || 15 || 40 || 15 || 100
  U2  || 27 || 17 || 8  || 23 || 25 || 100

我寻找的答案是这样的表格:

P1:

User  || C2 || C3 || C4 || C5 
  U1  || 20 || 15 || 40 || 15 
  U2  || 17 || 8  || 23 || 25 
4

1 回答 1

1
SELECT *, C1+C2+C3+C4+C5 AS total
FROM t1
WHERE C1+C2+C3+C4+C5 > 80
于 2015-04-21T11:01:49.163 回答