select a.衬底码,a.检验时间,a.良率, b.检验时间,b.良率, c.检验时间,c.良率, d.检验时间,d.良率,
from table_name a where 站点 = ‘1’
left join table_name b on b.衬底码 = a.衬底码 and 站点 = ‘2’
left join table_name c on c.衬底码 = a.衬底码 and 站点 = ‘3’
left join table_name d on d.衬底码 = a.衬底码 and 站点 = ‘4’
------------------------------------------------------------------------
注:将sql中的table_name全部替换为你的这个表名