I am very new to sql.The actual problem is much bigger.
I need information in the following case. Say I have two tables like
MemberTable
MonthID | UserID | TeamID
-----------------------------
1 | 1 | 6
1 | 2 | 6
1 | 3 | 6
1 | 4 | 6
AND
ReportTable
ID* | MonthID | UserID | IsSend
-----------------------------------
1 | 1 | 2 | False
2 | 1 | 3 | True
I need total count of users not present in ReportTable and the users for whom the IsSendValue is False i.e. count = 3
Is it possible to do that in one query? Please give explanation if it is not possible and possible solution.
should return users with
UserID1, 2 and 4. A more concise query to achieve the same result is: