jeudi 26 février 2015

sqlite: several rows grouped in one row

I need a sql solution for this problem I am dealing with:


I have the following rows in a table


cod coda pricea priceb pricec x1 y 20 50

x2 y 20 50 x3 y 60 x4 z 80 x5 z 85 x6 z 85


I need to get this result in only one row considering prices are always the same by coda


coda pricea priceb pricec y 20 50 60 z 80 85 85


How can I get this result with sql?? I tried to do it by sum and group by coda but it returns the sum of prices.


Aucun commentaire:

Enregistrer un commentaire