Need help on Query design

SKV

Active Member
Joined
Jan 7, 2009
Messages
257
I am trying to query a transactional historical data having fields - origin, destination, Supplier, rates. Each field have multiple combination with other fields. I want to see the result by origin, by destination, by Supplier, Avg of rates.
I can use the group by function for the above query. But on seeing the rates I understood it has lot of wrong data in it. To correct it, I want that Avg should be taken for the 3 rates (with highest frequency) only and discards all zeros if any.
Further I want only top 5 records should be displayed for each group of Origin, Destination, Supplier.

Please help me in designing this query.
 

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