Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By
Message
 
 
To
16/05/2002 08:58:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00657347
Message ID:
00657358
Views:
23
Select col1, ;
     SUM( IIF(col2=0,1, 0) AS sum2, ;
     SUM( IIF(col3=0,1, 0) AS sum3, ;
     SUM( IIF(col4=0,1, 0) AS sum4 ;
  FROM mytable ;
  GROUP BY col1
>Hi all
>I have a table like this:
>
>A          0            1           1
>A          1            1           0
>A          1            1           0
>B          0            1           1
>A          1            0           0
>A          1            0           1
>B          1            0           1
>B          1            0           0
>A          0            1           1
>
>and I need SQl-Cursor like this
>A          2            2           3
>B          1            2           1
>where the columns in the cursor are count of zeros
>Thanks in advance
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform