mercredi 4 mars 2015

How to select only the first distinct value in a column, but have blanks in that column in the other rows otherwise


Is there any way that I can turn a table like this with a query like



SELECT name,child from People

|----------------------|
| name | child |
| John | Jack |
| John | Jerry |
| Carol | Carol |
| James | Carl |
| James | Lawrence |


into this?



|----------------------|
| name | child |
| John | Jack |
| | Jerry |
| Carol | Carol |
| James | Carl |
| | Lawrence |


Thanks!





Aucun commentaire:

Enregistrer un commentaire