supplier with more than one category (1 Viewer)

strategy

New member
Local time
Today, 16:55
Joined
Jan 14, 2015
Messages
1
Hello
I've got a table called invoice with a field supplier and another one invoice_category among others.
How can I retrieve all the suppliers that have more than two categories in the invoice table.

I tried
Code:
select count(*) from (select distinct invoice_category from invoice)
but it didn't work.

Any ideas? :)
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:55
Joined
Feb 19, 2013
Messages
16,553
suggest you use the query wizard for find duplicates on the following query

Code:
 select distinct supplier, invoice_category from invoice
 

smig

Registered User.
Local time
Today, 16:55
Joined
Nov 25, 2009
Messages
2,209
I normally use the query builder for this.

Code:
SELECT [supplier]
FROM [invoice]
GROUP BY [supplier]
HAVING Count([invoice_category]) > 2;
 

Users who are viewing this thread

Top Bottom