boxs |
---|
[10001] |
[10001,10002] |
[10001,10002] |
[10001,10003] |
这个只能说联合查询、每个编码用like统计条数然后三个结果union起来
select
count(01) 01_num
,count(02) 02_num
,count(03) 03_num
from
(
select
case when t.boxs like '%10001%' then 1 else null end as 01
,case when t.boxs like '%10002%' then 1 else null end as 02
,case when t.boxs like '%10003%' then 1 else null end as 03
from table t
)
有没有一个表的某一列记录了完整的label清单?