How could one achieve to get sums of column values regarding tags in a second column?
tag1 1000
tag1 2000
tag2 1000
tag3 1000
tag2 3000
tag1 1000
tag3 1000
tag3 1000
tag2 2000
tag3 2000
The required result looks like this
tag1 4000
tag2 6000
tag3 5000
GROUP BY
on the tag column with sum
SELECT tagColumn, sum(tagValue) as TotalCount
FROM Table1
GROUP BY tagColumn
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加