Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL where problem
Message
De
24/09/1997 10:22:58
 
 
À
24/09/1997 10:12:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00051392
Message ID:
00051397
Vues:
33
>I would like to use sql to calculate the sum(SomeField) but broken down by Jan-March , April-June , July-Sept and Oct-Dec.
>
>Do I need four seperate sql statements and then merge the tables together.
>
>TIA

Asumming that table1 has two fields: num I, date D:
Select ceiling(month(date)/3) as quarter,sum(num) as sumnumber from table1 group by 1
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform