The code for salePerOrder.sql is: DROP VIEW IF EXISTS salePerOrder; CREATE VIEW salePerOrder AS SELECT orderNumber, SUM(quantityOrdered * priceEach) total FROM orderDetails GROUP by orderNumber ORDER BY total DESC;