I have three tables that I'm trying to get information from. I need to know how to extract users that perform either of two tasks but not another. Users can do one, two or all three tasks
user-id | user-name
--------+----------
1 | joe
2 | beth
3 | tim
task-id | task-name
--------+----------
1 | ls
2 | man
3 | grep
user-id | task-id
--------+---------
2 | 1
2 | 3
1 | 1
3 | 2
I want to select all user-name that perform task-name "ls" or "man" but do not perform task-name "grep".
Please help.
user-id | user-name
--------+----------
1 | joe
2 | beth
3 | tim
task-id | task-name
--------+----------
1 | ls
2 | man
3 | grep
user-id | task-id
--------+---------
2 | 1
2 | 3
1 | 1
3 | 2
I want to select all user-name that perform task-name "ls" or "man" but do not perform task-name "grep".
Please help.