Many To Many Search in Table

User Table

UseridUsername
1Name1
2Name2
3Name3

Subscription Table

SubIdSubName
1Subname1
2Subname2

User_Subscription Table

UseridSubId
11
12
22
31

Many To Many Search Format1

How Many users Subscripted in 1 or 2

SELECT Userid,SubId, count(*) as countt FROM User_Subscription e where
Subscripted in (2,1) group by Userid;

Many To Many Search Format2

How Many users Subscripted in 1 and 2

SELECT Userid,SubId, count(*) as countt FROM User_Subscription e where
Subscripted in (2,1) group by Userid having countt=2;