Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SELECT * FROM PRODUCT WHERE P_CODE = (SELECT P_CODE FROM LINE WHERE LINE_TOTAL > AVG(LINE_TOTAL));
你可能需要这个:
SELECT * FROM PRODUCT WHERE P_CODE in (SELECT P_CODE FROM LINE WHERE LINE_TOTAL > (select AVG(LINE_TOTAL) from LINE) );