0

我正在尝试运行以下查询:

SELECT  vtiger_products.productcategory AS "Product Category",
        SUM(vtiger_inventoryproductrel.quantity) AS "Line Item Qt"
  FROM bi_batch.vtiger_inventoryproductrel
       INNER JOIN bi_batch.vtiger_products
       ON vtiger_inventoryproductrel.productid
4

1 回答 1

0

看起来您需要一个 group by 子句,您的非聚合列没有一个。尝试添加“按 vtiger_products.productcategory 分组”

于 2013-07-10T14:12:26.213 回答