CREATE TABLE wine (no NUMBER, grape CLOB, winery CLOB, appelation CLOB, state CLOB, name CLOB, year NUMBER, price NUMBER, score NUMBER, cases NUMBER, drink CLOB)
CREATE TABLE grapes (id NUMBER, grape CLOB, color CLOB)
CREATE TABLE appellations (no NUMBER, appelation CLOB, county CLOB, state CLOB, area CLOB, isava CLOB)

Find the average price of wines that are not produced from Sonoma county.
SELECT AVG(price) FROM wine WHERE NOT appelation IN (SELECT T1.appelation FROM appellations AS T1 JOIN wine AS T2 ON T1.appelation = T2.appelation WHERE T1.county = 'Sonoma')
WITH "_u_0" AS (SELECT "T1"."appelation" FROM "appellations" "T1" JOIN "wine" "T2" ON "T1"."appelation" = "T2"."appelation" WHERE "T1"."county" = 'Sonoma' GROUP BY "appelation") SELECT AVG("price") FROM "wine" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "appelation" WHERE "_u_0"."" IS NULL