我有个问题。
这是查询:
SELECT a.naam as "Artiest", SUM(o.numberOfOrders) as "Aantal singles",
(SUM(o.numberOfOrders) * s.price) * 0.35 as "Winst
FROM orders o
JOIN singles s ON s.singleid = b.singleid
JOIN artist a ON a.artistid = s.artistid
WHERE b.date= TO_DATE('15/MAY/2012','dd/mon/yyyy')
GROUP BY a.name
当我执行此查询时,我收到错误:
“不是 GROUP BY 表达式”
我已经尝试将(SUM(o.numberOfOrders) * s.price) * 0.35也放入 group by ,
但随后出现错误:
“这里不允许使用群组功能”
我该如何解决?