好像也没有重复,不知错在哪
with t(n) as(select 1 n union all select n+1 from t where nlast and nlast and n<=12 and lv<2)
select count(distinct bmp),count(1) from
(
select bmp+(bmp<<18) bmp from f where lv=3
union all
select bmp+(bmp<<12)+(bmp<<24) from f2 where lv=2
);