N
Noozer
Consider the following two queries:
1) SELECT COUNT(*) AS BinTickets FROM Ticket GROUP BY Bin;
2) SELECT BinKeyLink FROM User2Bin WHERE UserKeyLink=User;
The first query counts the the number of tickets for each type of Bin. Each
row is the total number of tickets for a Bin.
The second query lists all the Bins for a specific User. Each row specifies
a Bin that the user is allowed to access.
What I want to do is find the total number of tickets that the user has
access to.
Filter the first query so that it will only Count tickets where the Bin is
linked to the user as shown in the second query and then sum all the Counts
to return a single sum.
Any help here? What kind of query is this? I'm familiar with Joins and
Unions, but it makes my head spin trying to put it into SQL.
If it matters, I'm using an MS Access table. Will move to MySQL once I have
the app functioning.
Thanks!!!
1) SELECT COUNT(*) AS BinTickets FROM Ticket GROUP BY Bin;
2) SELECT BinKeyLink FROM User2Bin WHERE UserKeyLink=User;
The first query counts the the number of tickets for each type of Bin. Each
row is the total number of tickets for a Bin.
The second query lists all the Bins for a specific User. Each row specifies
a Bin that the user is allowed to access.
What I want to do is find the total number of tickets that the user has
access to.
Filter the first query so that it will only Count tickets where the Bin is
linked to the user as shown in the second query and then sum all the Counts
to return a single sum.
Any help here? What kind of query is this? I'm familiar with Joins and
Unions, but it makes my head spin trying to put it into SQL.
If it matters, I'm using an MS Access table. Will move to MySQL once I have
the app functioning.
Thanks!!!