How do i get top 5 products from database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get the top five suppliers and products from a sales database, I can
get lists of products and suppliers but not a list of the top five selling
products or thier suppliers please help.
Nevc
 
KARL DEWEY said:
In your SQL add TOP 5 just after the SELECT.
Karl,
Sorry but I'm quite new at access, this is my first line of SQL: SELECT
tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup
Thanks
Nevc
 
Karl,
Sorry but I'm quite new at access, this is my first line of SQL: SELECT
tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup
Thanks
Nevc

So just do what he said and add TOP 5 after the word SELECT

SELECT TOP 5 tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup

Tom Lake
 
TOM,
I did try this before but it just returns the top 5 of my list not the top
five selling products or suppliers.
regards
Nevc

Tom Lake said:
Karl,
Sorry but I'm quite new at access, this is my first line of SQL: SELECT
tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup
Thanks
Nevc

So just do what he said and add TOP 5 after the word SELECT

SELECT TOP 5 tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup

Tom Lake
 
Tom Lake said:
Karl,
Sorry but I'm quite new at access, this is my first line of SQL: SELECT
tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup
Thanks
Nevc

So just do what he said and add TOP 5 after the word SELECT

SELECT TOP 5 tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup

Tom Lake
 
You haven't mentioned how you are determining the top 5. In other words,
what field contains the calculated value? See Access Help for "Perform
calculation is a query". Once that is done, try sorting by that field in the
query design grid (or ORDER BY that field in the SQL statement).

nevc said:
TOM,
I did try this before but it just returns the top 5 of my list not the top
five selling products or suppliers.
regards
Nevc

Tom Lake said:
:

In your SQL add TOP 5 just after the SELECT.

:

How do I get the top five suppliers and products from a sales database,
I can
get lists of products and suppliers but not a list of the top five
selling
products or thier suppliers please help.
Nevc
Karl,
Sorry but I'm quite new at access, this is my first line of SQL: SELECT
tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup
Thanks
Nevc

So just do what he said and add TOP 5 after the word SELECT

SELECT TOP 5 tblSupplier.SupplierAccountNumber, tblReturns.[Product Code],
tblNewProducts.ProductGroup

Tom Lake
 
Back
Top