Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. select distinct
  2. stock.teamType,
  3. stock.teamName,
  4. stock.leagueType
  5. from teamNames stock
  6. left join teams user on stock.teamName not in (user.teamName)
  7. where user.membID = 20 and stock.leagueType = 'nfl'
  8.  
  9. select distinct stock.teamType, stock.teamName, stock.leagueType
  10. from teamNames stock
  11. left join teams on stock.teamname = teams.teamname
  12. and teams.membid = 20
  13. where teams.teamname is null
  14. and leaguetype = 'nfl'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement