Hi,
I have a table that gets updated on a weekly basis with the names of active users. I'm trying to make a query that tells me which users are missing from the current week compared to the entire table/all previous weeks. I only want the user to show up once, and it has to be the newest data for that user.
If I do a Select *, this is what the table would look like
Expected Query Results
How would I write a query that gives me this data? I've read about creating a query that compares the single table as if it were two tables, but I couldn't get that working.
I have a table that gets updated on a weekly basis with the names of active users. I'm trying to make a query that tells me which users are missing from the current week compared to the entire table/all previous weeks. I only want the user to show up once, and it has to be the newest data for that user.
If I do a Select *, this is what the table would look like
Code:
Name Effective_Date
User1 09/18/10
User2 09/18/10
User3 09/18/10
User4 09/18/10
User5 09/18/10
User6 09/18/10
User1 09/25/10
User2 09/25/10
User3 09/25/10
User4 09/25/10
User5 09/25/10
User6 09/25/10
User1 10/02/10
User2 10/02/10
User4 10/02/10
User5 10/02/10
User6 10/02/10
User1 10/09/10
User2 10/09/10
User4 10/09/10
User6 10/09/10
Expected Query Results
Code:
Name Last_Date
User3 09/25/10
User5 10/02/10
How would I write a query that gives me this data? I've read about creating a query that compares the single table as if it were two tables, but I couldn't get that working.
Last edited: