select * from test1
union all
select 0 as score,a.title,b.year,b.week
from (
select distinct title from test1) a
cross join (
select distinct [year],[week] from test1) b
left join test1 c
on a.title =c.title and b.[year]=c.[year] and b.[week]=c.[week]
where c.title is null and c.[year] is null
union all
select 0 as score,a.title,b.year,b.week
from (
select distinct title from test1) a
cross join (
select distinct [year],[week] from test1) b
left join test1 c
on a.title =c.title and b.[year]=c.[year] and b.[week]=c.[week]
where c.title is null and c.[year] is null
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货