我的代码如下:
SELECT Last,OrderLine.OrdID,OrdDate,SUM(Price*Qty) AS total_price FROM ((Cus INNER JOIN Orders ON Cus.CID=Orders.CID) INNER JOIN OrderLine ON Orders.OrdID=OrderLine.OrdID) INNER JOIN ProdFabric ON OrderLine.PrID=ProdFabric.PrID AND OrderLine.Fabric=ProdFabric.Fabric GROUP BY Last ORDER BY Last DESC,OrderLine.OrdID DESC;
此代码之前已经得到了回答,但含糊不清.我想知道我哪里出错了.
You tried to execute a query that does not include the specified expression ‘OrdID’ as part of an aggregate function.
是我不断得到的错误消息,无论我改变什么,它都会给我这个错误.是的我知道,它是用sql-92编写的,但是我该如何使它成为一个合法的功能呢?