How to find distinct columns in a nested subquery in SQL?
问题 I need to find the distinct drinkers that ordered 'VODKA' and 'WHISKY'. I AM ONLY ALLOWED TO USE A NESTED QUERY. No other format is accepted. I am quite new to sql so any help would be greatly appreciated! Here are the tables I am trying to retrieve data from: CREATE TABLE DRINKERS ( /* All drinkers */ DRINKER VARCHAR(30) NOT NULL, CONSTRAINT DRINKERS_PKEY PRIMARY KEY (DRINKER)); CREATE TABLE ORDERS( /* Drinkers visit pubs and consumes drinks */ DRINKER VARCHAR(30) NOT NULL, /* Drinker name *