Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL where problem
Message
From
24/09/1997 10:22:58
 
 
To
24/09/1997 10:12:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00051392
Message ID:
00051397
Views:
31
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform