时间:2024-02-13 10:23作者:下载吧人气:24
数据表中有一列数据,如图所示:
现在需要将该列数据分成三列。
SQL 代码如下所示:
第一种
select
max(case when F1%3=1 then F1 else 0 end) a,
max(case when F1%3=2 then F1 else 0 end) b,
max(case when F1%3=0 then F1 else 0 end) c
from HLR151
group by (F1-1)/3
网友评论