basic sql sum statement - help i'm going mad

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi

I have a table that displays some advert costs for an agency.

one colum is 'order total'

i can get total for all orders but cannot filter on a date range

i think the sum query should be used to do the calculation on the fly
but i'm just not getting it.

sweets for the first avaiable solution.

dan
 
Dan said:
I have a table that displays some advert costs for an agency.

one colum is 'order total'

i can get total for all orders but cannot filter on a date range

i think the sum query should be used to do the calculation on the fly
but i'm just not getting it.


If you want the total for all orders in the table that are
in the specified date range:

SELECT Sum([order total[) As SumOfOrders
FROM [a table]
WHERE [order date] Between [start date] And [end date]

That seems a little too simple to be useful so If you need
to do something else, please explain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top