1

SELECT * FROM PRODUCT WHERE P_CODE = (SELECT P_CODE FROM LINE WHERE LINE_TOTAL > AVG(LINE_TOTAL));

4

1 回答 1

0

你可能需要这个:

SELECT * 
FROM PRODUCT 
WHERE P_CODE in (SELECT P_CODE 
                 FROM LINE 
                 WHERE LINE_TOTAL > (select AVG(LINE_TOTAL) from LINE)
                );
于 2021-04-21T00:37:36.847 回答