1 |
select dname,b.yj '一月份' ,c.yj '二月份' ,d.yj '三月份' from table2 a left join table1 b on a.dep=b.dep and b.mon= '一月份' left join table1 c on a.dep = c.dep and c.mon= '二月份' left join table1 d on a.dep = d.dep and d.mon= '三月份' |
热门源码