I have two tables Invitations and Users, both table contain some emails.
I want to count those emails which are present in the Invitation table but not present in the Users table
Invitation
InvitationID Email
-------------------------------------
1 [email protected]
2 [email protected]
3 [email protected]
Users
UserName IsActive
-------------------------------------
[email protected] InActive
[email protected] Active
[email protected] InActive
I tried it like this
SELECT COUNT(*) FROM Invitations, Users
where Invitations.Email <> Users.UserName
I want like this
Count=1