Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Statement
Message
 
To
19/08/2002 16:54:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00691225
Message ID:
00691230
Views:
11
Hi Steven.

You can use something like this -
SELECT (YEAR(ddate) * 100 + MONTH(ddate)) as nmonth, ccode, COUNT(ccode) AS cnt ;
  FROM test ;
  GROUP BY nmonth, ccode
HTH

Dan

>I have a table with a date field and a code field. The code field can be a 1 or a 2. I want to see how many 1's there are per each month of the date field and do the same for the 2's. Can this be done with one SQL statement?
Previous
Reply
Map
View

Click here to load this message in the networking platform