I have a database that is used for recording transactions by customers.
The table (transactions) is set out as follows:
ID | Added-date | userid | amount | department | transaction-date | addedby 1 yyyy-mm-dd P1001 9.78 dpt 1 yyyy-mm-dd username 1 yyyy-mm-dd P1023 19.78 dpt 2 yyyy-mm-dd username 1 yyyy-mm-dd P1021 39.78 dpt 3 yyyy-mm-dd username 1 yyyy-mm-dd T1501 9.78 dpt 2 yyyy-mm-dd username
What I would like to do is be able to view all of the users who have never bought anything in department x .
Does anyone have any suggestions as to the best way to go about this?