|
Blue Forest http://www.lslnet.com at 11:08 on July 8, 2006
Select questions. Table
(A char (10);
Char b (10);
Number days.
)
I use a phrase how the statistics for a, b is a certain set of values d>;0 GDP and the total number of records, and records of the total number and value d<0.
I can use
Select a, b, sum (d), count (*) from table
Where d "; 0
Group by a, b
Select a, b, sum (d), count (*) from table
Where d "0
Group by a, b
Two sentences to achieve, but I do not know whether on a sgl, watched case grammar, I do not know whether longer useful |
Select questions. [code]select A, b, sum (d), sum (case when d>;0 then one else 0 end)
Fom table
By a group that b[/code] |
Select questions. Select a, b, sum (<(1-(sign (sign (d) +1)))).
Sum (case when sign (d) divisor then one else 0 end)
Sum (<(sign (sign (d) +1))).
Sum (case when sign (d), "then one else 0 end CO2) from table
Group by a, b
Select a, b, sum (d), count (*) from table
Where d "; 0
Group by a, b
Select a, b, sum (d), count (*) from table
Where d "0
Group by a, b |
Select questions. Make a presentation led
Select (select count (d) from table where d>;0) as Dgt0 from table group by a, b |
Select questions. Thank you |
| |