S
SimonJester
Hi everybody.
I sure hope someone can help.
I have two tables: book_search and books_purchased.
I want to be able to count the distinct number of customers
(customer_id) who have searched for a particular author by the author
name and I want a distinct count of the customers who have purchased
books by the same author as in the first table.
It is entirely possible that a customer in the search table could have
also purchased the book they searched for and thus be in the
books_purchased table. Design issues aside - I can't change what is -
is there a way that I can do a distinct count of book_search by author
customers (customer_id) then do a distinct count of books_purchased by
author customers (customer_id), but in books_purchased not count any
records where the customer also appears in the book_search table?
Any suggestions would be very gratefully appreciated.
Thanks everyone.
SJ
I sure hope someone can help.
I have two tables: book_search and books_purchased.
I want to be able to count the distinct number of customers
(customer_id) who have searched for a particular author by the author
name and I want a distinct count of the customers who have purchased
books by the same author as in the first table.
It is entirely possible that a customer in the search table could have
also purchased the book they searched for and thus be in the
books_purchased table. Design issues aside - I can't change what is -
is there a way that I can do a distinct count of book_search by author
customers (customer_id) then do a distinct count of books_purchased by
author customers (customer_id), but in books_purchased not count any
records where the customer also appears in the book_search table?
Any suggestions would be very gratefully appreciated.
Thanks everyone.
SJ