examplecolumn' is invalid in the select list because it is not contained in either an aggregate function or the GROUP错误方面有一段时间遇到了问题,最让我恼火的是,最终的修复方法是将每一列都添加到GROUP BY子句中。在做了一些研究之后,我仍然不完全明白为什么这会导致一个错误,而不是给你一个非常难看的桌子,但这并不是重要的部分。
重要的
, count(*) as hits, avg(elapsed)WHERE [url] IS NOT NULL and floordate >= '2017-05-01'执行计划基本上是PK上的聚集索引扫描(int,自动增量,97%的工作)。事情是这样的:URL有一个索引(常规索引,因为我总是在搜索完全匹配的索引),floordate也有一个索引.PS:表有70M项长,此查询运行
我试图帮助某人在他的代码上实现新的函数;但是我有这个错误
Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregatedcolumn 'br_interne.questionnaires_reponses.re_int' which is not functionally dependent on columns in GROUPBY clause; this is incompatible with <
references car (id), price int我可以成功地将c.color和c.brand包含在选择列表中,as min_appraisal,from car cgroupby c.id; -- c.color, c.brand are not needed here
但是,以下查询失败,因为它不允许我在se