SQL Beginner Query Logic With 3 Tables
问题 The sql tables are as follows: likes with columns drinker and beer, sells with columns bar and beer and frequents with columns drinker and bar. I have previously answered the following statement: "Drinkers who frequent bars which serve some beer they like" with the SQL Query: SELECT DISTINCT y.drinker FROM likes a, sells, frequents y WHERE a.beer = sells.beer AND sells.bar = y.bar AND y.drinker = a.drinker; Now, I am trying to modify the query listed above to answer a similar, yet different