Please the boss
Use a temporary table
CodePudding user response:
Mainly conditions, 1 to 8 is different condition, with normal SQL statement GROUP BY the command can't meet the requirements, whether to loop data sets, using a temporary table,CodePudding user response:
Such as the SELECT SUM (index 1),,, SUM index (8) the WHERE condition 1SELECT SUM (index 1),,, SUM index (8) the WHERE condition 2
CodePudding user response:
Or use FOR I=0 TO collect the unit numberUse A1=index 1 + A1 such
A1=index 1 + 1 A1 the WHERE condition
CodePudding user response:
Select count or sum (CASE 1 THEN return to the WHEN condition field (1) the END) AS statistics and 1Count or sum (CASE 2 the WHEN condition THEN to return to the field END) AS statistical 2
.
From the table where conditions,
CodePudding user response:
Above, under the Oracel through other database didn't try!