Top 80% of Spend

B

brittonsm

I'm trying to figure out how to approach this query - I have a qry
with spend data (i.e. each PO sent to a supplier)

I'm trying to return just the top 80% of the total spend figure, but I
seem to get the top 80% of the recordset.

Anyone know how to do this?

Supplier Spend Amt
XYZ $6,000
ABC $5,000
EFG $4,000

etc.
 
S

Stefan Hoffmann

hi,
I'm trying to return just the top 80% of the total spend figure, but I
seem to get the top 80% of the recordset.
Try this:

SELECT TOP 80 PERCENT *
FROM [yourTable]
ORDER BY [Spend Amt]


mfG
--> stefan <--
 
Top