Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 2 tables , dashboard & group. Dashboard is a table which has info of users who actually accessed the dashboards.
Group is a table which has users & user details like country in those groups. If Group A has 2 dashboards & 4 users then all 4 users will have access to those 2 dashboards.
My requirement is to get the list of users who actually accessed the dashboard & who can acess the dashboard with user details from Group table (Like country).
I tried various combinations of joins & composite key but not getting expected results (getting users who can access dashboard with country details & users who accessed dashboards with country details.)
Am i sounding confusing? please take a look at sample dashboard it may help you to understand requirement better.
Can you show expected result from your sample data?
There is no table having this detail "users who actually accessed the dashboard" in your app
DashboardName | User | Country |
---|---|---|
Customer | Ewa | GB |
Customer | Jon | GB |
Customer | Jonjon | GB |
Customer | Logan | GB |
Customer | Mika | US |
Customer | Noah | US |
Customer | Pine | US |
Customer | Rahan | US |
Customer | Smita | US |
Customer | Raj | IN |
Customer | Ritu | IN |
Above result set is users who are having access to customer dashboard.
Dashboard Name | DashboardUsers | Country |
---|---|---|
Customer | Ewa | GB |
Customer | Jon | GB |
Customer | Ritu | IN |
This result set is users who actually accessed the dashboard.
Dashboard table has data of users who actually accessed the dashboard.
what's your desired output??
I need both resultset. When selected a dashboard it should show me result sets
1. users who accessed the dashboard
&
2. resultset users who CAN access the dashboard.
Try this