Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I total using sql statement
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00703851
Message ID:
00703852
Views:
15
select sum(x), y from mytable group by y
>if I have the following cursor and I want a total of each amount belonging to an item how would I go about writing an sql statement for that.
>
>
>x        y
>2        bells
>5        tables
>3        bells
>4        glasses
>
>
>I need the result to show up as:
>
>
>x        y
>5        bells
>4        glasses
>5        tables
>
>
>Thanks
>Nick Patel
Hector Correa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform