Query Amount by Earliest Dates

crusader

Board Regular
Joined
Apr 16, 2011
Messages
50
I am using Access 2010 and have tried to search for an answer to the following question without success. I came across stuff that was too obscure for me - and none that specifically talked about earliest/latest dates.

I need to build a query that will show all the fields for each customer but limited to first 5 transaction dates. In this case, the query result will have 15 rows (5 for each customer) - based on earliest transaction dates for each customer - grouped by customer (each customer's first 5 transaction dates are not necessarily the same).

I also need 2 other queries: one that will sum the first 5 date based transaction amounts grouped by customer (a summary query) and one that sums "left over" transactions (transactions that occurred on 6th and later transaction dates) - also grouped by customer.

No VBA, please.

All help will be greatly appreciated!

CustomerIDOrderIDOrderDateAmount
111/1/15200
121/6/15300
231/2/1550
141/3/1560
351/2/15900
261/9/15400
171/12/15300
381/3/15100
292/1/15200
1102/2/1566
3112/15/1590
2122/11/15500
2132/9/15100
1142/9/15300
3152/28/15250
1162/27/15444
2172/16/15700
3182/20/15300
3191/19/15650
2201/30/15125
3211/1/15700

<tbody>
</tbody>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,221,828
Messages
6,162,213
Members
451,752
Latest member
freddocp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top