title: Sql query to check combinations and match it to the given combination
body: <p>I've a scenario in Sql where I've following schema.</p>
  
  <p><img src="https://i.stack.imgur.com/Z3nSv.jpg" alt="enter image description here"></p>
  
  <p>If I have 3 items in the Item table then one unique combination of all the items will be assigned to a user. For ex:</p>
  
  <p>Items:
  1
  2
  3</p>
  
  <p>Then combinations will be: {1}, {2}, {3}, {1,2}, {1,2,3}, {1,3}, {2,3) all are unique combinations. 
  Any of these combination will be assigned to a single user. </p>
  
  <p>Now I want to find out given combination belongs to which user, how can I find that? For ex: I'll pass items list {2,3} then it should return the userid who is having that combination from the table UserItemCombinations. {2,3} is passed as comma separated string to a SP. I've taken 3 items as example, this table may contain n number of items. Users number will be dependent on the number of combinations. For ex: For three items there are 7 combinations so 7 users will be there user table.</p>