我使用以下代码并得到以下错误
select d.searchpack,d.context, d.day,d,txnid,d.config, c.sgtype from ds3resultstats d join
context_header c on (d.context=c.contextid) where (d.day>='2012-11-15' and d.day<='2012-11-25' and c.sgtype='Tickler' and d.config like
'%people%') GROUP BY d.context limit 10;
FAILED: Error in semantic analysis: line 1:7 Expression Not In Group By Key d
Run Code Online (Sandbox Code Playgroud)
我猜我正在错误地使用该组
使用时group by
,您无法选择其他附加字段.您只能选择具有聚合功能的组密钥.
有关详细信息,请参阅配置单元组.
相关问题.
代码示例:
select d.context,count(*)
from ds3resultstats
...
group by d.context
Run Code Online (Sandbox Code Playgroud)
或通过乘法字段分组.
select d.context, d.field2, count(*)
from ds3resultstats
...
group by d.context, d.field2
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4876 次 |
最近记录: |