dog_star
asked on
A simple SQL exclusion question
hi,
i have a customers table and an orders table in my client's database...
in the customers table there is a boolean value for "dealer" (ie whether they're are a dealer or not)
in the orders table there is "customers_id" column for the id number of the customer (funnily enough :))
now, my client want a list of all dealers who signed up within a certain period but haven't placed an order...
could someone help me with the SQL to produce this list
many thanks in advance for any help
i have a customers table and an orders table in my client's database...
in the customers table there is a boolean value for "dealer" (ie whether they're are a dealer or not)
in the orders table there is "customers_id" column for the id number of the customer (funnily enough :))
now, my client want a list of all dealers who signed up within a certain period but haven't placed an order...
could someone help me with the SQL to produce this list
many thanks in advance for any help
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
manythanks for your help
FROM customers
LEFT JOIN orders ON customers.customers_id= orders.customers_id
WHERE customers.dealer = 1