Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group Records
Message
From
03/05/2002 11:08:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00652424
Message ID:
00652429
Views:
19
This message has been marked as the solution to the initial question of the thread.
>Hi Friends!
>
>How can I group records from a table, without a specific ID of customer? What I need is to sum the account of the customer.
>
>TIA!

SELECT ... GROUP BY.

For instance, to group by customer:
select cliente, sum(total_factura) as total_factura;
  from factura;
  group by cliente
This will combine several records into one - in this example, all invoices from one customer will be grouped into one single record, which contains the total for that customer.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform