Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Question
Message
From
27/07/1998 15:34:11
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00121732
Message ID:
00121745
Views:
16
>I've got a long program with a lot of scanning and counting to make a report. I'm wondering if it's possible to do the same thing in SQL.
>
>I have a table that includes two fields: Class and Zone. For each unique value of Zone, I want a count of how many of each type of class are in that zone.
>
>Say there's 3 zones: 1,2,3. Two classes: A,B.
>
>I want to know how many times for
>1,A
>1,B
>2,A
>etc.
>
>So I'll know Zone 1 had 6 of Class A.
>
>Can this be done in SQL?
>
>Thanks,
>
>-Michelle

Select Zone,Class,count(*) From Table1 Group by Zone,Class
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform