CREATE VIEW SalePerOrder AS
SELECT
orderNumber, SUM(quantityOrdered * priceEach) total
FROM
orderDetails
GROUP by orderNumber
ORDER BY total DESC;
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266787.html
CREATE VIEW SalePerOrder AS
SELECT
orderNumber, SUM(quantityOrdered * priceEach) total
FROM
orderDetails
GROUP by orderNumber
ORDER BY total DESC;
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266787.html