>If I have a table that has 20 records in it, and the first 10 store the number 1 and the second 10 store the number 2 in it. Is there any way to use the SQL Select statement to count the number of occurences of 10 and 20 in one statemnet? Or do I have to use a calculate cnt() statement twice, once for 10 and once for 20.
>
>Thanks,
>Matt
Matt,
Assuming the name of the field that has the numbers in it is Field1;
SELECT Field1, COUNT(Field1) FROM TableName GROUP BY 1 INTO CURSOR MyResult
would give you a result of;
1 10
2 10