
展开全部
假设表1的3个字段名字分别为name,date,score
select distinct name,
(select score from table1 where a.name=name and date='14')as '14',
(select score from table1 where a.name=name and date='15')as '15',
(select score from table1 where a.name=name and date='16')as '16'
from table1 a
大概这样吧,你试试先
select distinct name,
(select score from table1 where a.name=name and date='14')as '14',
(select score from table1 where a.name=name and date='15')as '15',
(select score from table1 where a.name=name and date='16')as '16'
from table1 a
大概这样吧,你试试先
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询