|
发表于 2024-7-28 14:44
来自手机
|
显示全部楼层
//select * from 连续上班天数;
cli_one_dim~连续上班天数~1;
create temp table aa as
select * from 连续上班天数union order by f01,属性;
create temp table bb as
select rowid,iif(数量 not like lag(数量)over() or rowid=1,rowid,'') grp,* from aa;
create temp table cc as
select f01,fillna(grp) grp from bb;
create temp table dd as
select f01,grp,count(*) c from cc group by f01,grp;
create temp table ee as
select f01,max(c) 最长连续上班 from dd;
select * from 连续上班天数 left join ee using(f01); |
评分
-
1
查看全部评分
-
|