SELECT TOP 10 p.Name AS 'Product Name', SUM(sod.OrderQty) AS 'Total Unit Volume' FROM Sales.SalesOrderDetail sod JOIN Production.Product p ON sod.ProductID = p.ProductID GROUP BY p.Name ORDER BY 'Total Unit volume' DESC;
说明:该SQL查询语句通过连接SalesOrderDetail和Product两个表,在分组和汇总操作后,按单位销量的倒序顺序返回前10个产品的名称和总销量。