supplier with more than one category (1 Viewer)

strategy

New member
Local time
Today, 20:52
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, 18:52
Joined
Feb 19, 2013
Messages
12,147
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, 20:52
Joined
Nov 25, 2009
Messages
2,133
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 (Users: 0, Guests: 1)

Top Bottom