Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By
Message
From
16/05/2002 09:12:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
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:
00657356
Views:
25
This message has been marked as the solution to the initial question of the thread.
>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

For posting messages like this, use the < PRE > tag to keep your original format. PRE means preformatted.

For the grouping, use an expression like sum(iif(Field1 = 0, 1, 0)) to get the count of zeroes.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform