- CREATE VIEW SalePerOrder AS
- SELECT
- orderNumber, SUM(quantityOrdered * priceEach) total
- FROM
- orderDetails
- GROUP by orderNumber
- ORDER BY total DESC;
转载请注明:谷谷点程序 » mysql 创建一个简单的视图
- CREATE VIEW SalePerOrder AS
- SELECT
- orderNumber, SUM(quantityOrdered * priceEach) total
- FROM
- orderDetails
- GROUP by orderNumber
- ORDER BY total DESC;
转载请注明:谷谷点程序 » mysql 创建一个简单的视图