【发布时间】:2017-12-29 10:15:54
【问题描述】:
我想在选择多个其他列的同时在单个列上使用聚合函数按一列分组。这在 MySQL 中通过下面的查询很容易实现。
SELECT sum(count),store,date,product FROM sales_log_bak where date > "2017-03-01" and date < "2017-04-05" group by date
但是,上面的查询在 oracle 数据库上不起作用。在 oracle 中,什么是等效的查询来实现 MySQL 在上面查询中给出的结果?
【问题讨论】:
-
遗憾的是,当不在 strict-mode 下工作时,这可以在 MySQL 中完成。但它很丑。
标签: oracle oracle11g oracle10g