> Thanks for the reply John.
>
[quoted text clipped - 64 lines]
> > >
> > >
Try saving this query as, say, qryIntermediary:
SELECT Industry, Sum(Costs) As SumOfCosts, Customer
FROM MyTable
GROUP BY Industry, Customer
then another query based on that query:
SELECT Industry, Sum(SumOfCosts) As Costs, Count(*) As NoOfCustomers
FROM qryIntermediary
GROUP BY Industry
It should actually be possible to do that in a single query:
SELECT Industry, Sum(SumOfCosts) As Costs, Count(*) As NoOfCustomers
FROM
(SELECT Industry, Sum(Costs) As SumOfCosts, Customer
FROM MyTable
GROUP BY Industry, Customer) AS Subquery
GROUP BY Industry

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Probably a better example!
>
[quoted text clipped - 96 lines]
>> > >
>> > > Many thanks in advance.