I am having a hard time getting my oracle developer query to output correctly. When I have the avg function in it, it gives me not a single group group error. When I take it out it works fine. I have tried using group by instead of order by but then it tells me that its not a group by expression.
SELECT LGBRAND.BRAND_ID, LGBRAND.BRAND_NAME, AVG(LGPRODUCT.PROD_PRICE)AS AVGER
FROM LGPRODUCT, LGBRAND
WHERE LGPRODUCT.BRAND_ID = LGBRAND.BRAND_ID
ORDER BY BRAND_NAME;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…