I have two tables:
Agents with columns: agentid, name
DocumentsRead with columns: agentid, document, dateread
I need to identify all the agents who have not read each document in the documentsread table. So if Agents holds 10 records and in DocumentsRead I have 5 records showing doc1 has been read and 4 records showing doc2 has been read my expected result should have 11 records in it. 5 showing the agents that have not read doc1 and 6 showing the agents that have not read doc2.
I understand how to use various queries to identify that records in Agents don’t exist in DocumentsRead but I can’t figure out how to make this work for each Document that is listed in DocumentsRead.
Try this query: