We have a table customer and table car.
customer table is defined as: cust#, transaction#
car table is defined as: transaction#, car model#
car model# can be either nissan, toyota or honda.
what we need to find out is how many distinct customer have bought a honda but not a nissan. there can be multiple records for car model# as a customer can buy 2-3 hondas or nissans.
Transaction # is primary key in car table.
What would be the most cost effective way of doing this?
Try this: