query sql needed

L

lee

name shipdate units
carol 1/3/2010 12000
miling 2/3/2010 15000
marcy 5/3/2010 14000
indiana 6/1/2010 17000
amc 7/1/2010 19000

i have a table like the one above with hundreds of records . i need
the sql which will convert into the table below- basically calculating
totals for last four previous dates( from current date or todays date)

current date-1 current date-2
name total units total units Grand Total

carl
miling
marchy
indiana

pls help with the query
 
L

lee

Try using a cross tab query with the date shipped field's
criteria:   Between Date()-4 And Date()-1
The cross tab query wizard should walk you through creating
the query.  

i am trying to run in oracle- or winsql - what will be SQL query ? any
help will be appreciated
 

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

Top