Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Statement
Message
 
À
19/08/2002 16:54:06
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00691225
Message ID:
00691230
Vues:
12
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform