Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.
CREATE TABLE products (product_id VARCHAR, product_price INTEGER); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_price INTEGER)
[SQL] SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products) [/SQL]