Hi,
I need assistance writing a query for the following scenario:
userid (not unique, duplicate ids)
trans_lvl - values could be 5 or 6 or (other)
The request is to find data for these three scenarios
1. distinct userids with 100% of its assigned trans_lvls = 5 (all of these userids are assigned only 5)
2. distinct userids with 100% of its assigned trans_lvls = 6 (all of these userids are assigned only 6)
3. distinct userids with 100% of its assigned trans_lvls having combination of both 5 and 6 (and only 5 and 6)
4. distinct userids with 100% of its assigned trans_lvls = anything else/any other combo
Data example:
userid trans_lvl
1 5
1 6
2 2
2 5
3 5
3 5
4 6
result would be:
userid1 under scenario 3
userid 2 under scenario 4
userid 3 under scenario 1
userid 4 under scenario 2
I've attached a script to recreate the data example (not tested - sorry, I don't have SS installed at home).
Thank you in advance.