You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
由于此问题没有最近的活动,因此已被自动标记为陈旧。如果没有进一步的活动,会作为不活跃issue关闭。感谢你对本项目的贡献。 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
描述
group by时对别名支持不大好,提示字段不存在: Column 'current_date_format' not existed.
重现
表结构:
CREATE TABLE
pontos_statistics_user_behavior
(pkid
bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id ##',id
varchar(100) NOT NULL DEFAULT '' COMMENT 'id ##',uid
varchar(100) NOT NULL DEFAULT '' COMMENT '用户ID #B-2#',behavior_type
varchar(100) NOT NULL DEFAULT '' COMMENT '行为类型 ##',behavior_at
bigint(13) NOT NULL DEFAULT '0' COMMENT '行为时间 ##',entity_id
varchar(100) NOT NULL DEFAULT '' COMMENT '实体ID ##',entity_type
varchar(100) NOT NULL DEFAULT '' COMMENT '实体类型 ##',lib_code
varchar(100) NOT NULL DEFAULT '' COMMENT '知识库编码 ##',space_code
varchar(100) NOT NULL DEFAULT '' COMMENT '空间编码 ##',content_gmt_create
bigint(13) NOT NULL DEFAULT '0' COMMENT '文档创建时间 ##',gmt_create
bigint(13) NOT NULL DEFAULT '0' COMMENT '创建时间 ##',gmt_modified
bigint(13) NOT NULL DEFAULT '0' COMMENT '更新时间 ##',PRIMARY KEY (
pkid
)UNIQUE KEY
unq_id
(id
),KEY
idx_space_lib_code_behavior_at
(space_code
,lib_code
,behavior_type
,behavior_at
),KEY
idx_lib_code_behavior_at
(space_code
,behavior_type
,behavior_at
)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=17898738 COMMENT='行为表 ##';
SQL:
select userbehavior.behavior_at as current_date_format, count(1) as current_content_total from pontos_statistics_user_behavior userbehavior where 1=1 group by current_date_format order by current_date_format asc;
环境
参数
可能与问题相关的设置参数
The text was updated successfully, but these errors were encountered: