Hello, everyone. At present, there is a database query design problem:
action table:
user_id, action_detail
1        "action_click"
2        "action_drag"
user info tablle
user_id, full_name, email
1        "User One" "userone@user.com"
1        "User Two" "usertwo@user2.com"
company info table
company_name,      company_domain
"User Company"     "user.com"
"User2 Company"    "user2.com"
the queries that need to be implemented currently include:
- find out the action records (action_detail) of all users of a company
- find out the action records (action_detail) of all users of a company, but exclude certain specified users
- find the action records (action_detail) of all users of multiple companies, but exclude certain specified users
based on the above three tables, how to effectively implement these three queries? thank you!
