Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how would I write this query

$
0
0
[USERNAME][GROUP]
User1New Member
User2New Member
User1All Members
User1Gold Member

How would I write a query so that I could select * from the above table where a user has more than 1 group (user1) and if one of the groups = 'All members' then ignore that row and just return the all the other rows for the user that has > 1 group.  Thanks in advance.  I can write the query for counting if a user has more than 1 group, but I stuck on the rest.

Thanks again


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>