sql - HOw to merge two rows into one adding last column if the row's first and second columns are equal -
i have 2 rows this:
a b val 2 3 43 2 3 32
i want output
a b val 2 3 75=(43+32)
i want tis operation applied whole table.
how can using sql query - in sqlite?
it looks need group by
select a, b, sum(val) yourtable group a, b
Comments
Post a Comment