|
Posted by 4partee on 09/26/48 11:37
create table x
> SELECT name, IF(class = 'bio', grade,'-') AS `bio`
> , IF(class = 'psych', grade,'-') AS `psych`
> , IF(class = 'chem', grade,'-') AS `chem`
> from tablex
>
>
select a.name, a.bio, b.psych, c.chem from x as a join x as b using(name)
join x as c using(name)
Navigation:
[Reply to this message]
|