Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple problem, but can't think of it...
Message
From
26/11/2001 18:42:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/11/2001 18:38:28
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00586085
Message ID:
00586088
Views:
12
>i have a HUGE table with account numbers. I am trying to find a certain sum, but I do not know which account no it is linked to. I need to sum totals in batches. Can anyone help? For example:
>
>Account No Total
>111222
>111222
>111222
>123668
>123668
>123668
>123668
>569999
>569999
>569999
>569999
>569999
>569999
>
>I need to get the total of 111222 then 123668, etc... I have over 100000 records to go through. Can anyone help me?? THanks!!

select accountNo, sum(Amount) as 'Total' ;
from mytable ;
group by accountNo ;
order by accountNo

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform