Unnamed
public text v1 · immutableSELECT Category.Description AS Category, InvoiceDetail.ProductID AS ProductId, Product.Description AS ProductName, Sum(InvoiceDetail.Quantity)
AS Quantity, InvoiceDetail.Price AS Revenue
FROM InvoiceDetail INNER JOIN
Product ON Product.ProductID = InvoiceDetail.ProductID INNER JOIN
Category ON Category.CategoryID = Product.CategoryId
GROUP BY InvoiceDetail.ProductID, Product.Description, Category.Description, InvoiceDetail.Price
order by Product.Description