select
name,
decode(style,'yw',performance) yw,
decode(style,'sx',performance)sx,
decode(style,'wy',performance)wy,
decode(style,'wl',performance)wl
from table1
group by name;
name,
decode(style,'yw',performance) yw,
decode(style,'sx',performance)sx,
decode(style,'wy',performance)wy,
decode(style,'wl',performance)wl
from table1
group by name;
MAX(decode(style,'语文',performance)) 语文,
MAX(decode(style,'数学',performance)) 数学,
MAX(decode(style,'外语',performance)) 外语,
MAX(decode(style,'物理',performance)) 物理,
from your_table
group by name