banx
banx

Reputation: 4416

How to group rows in SQL with more than 2 columns are of the same value?

One of the usages of GROUP BY is to group entries where a specified column is of the same value. How can we group entries if 2 or more selected rows have the same value?

Upvotes: 0

Views: 1333

Answers (1)

Tobiasopdenbrouw
Tobiasopdenbrouw

Reputation: 14039

You can GROUP BY Multiple columns (which is what you're asking, I think).

Select column1, column2 from MyTable
GROUP BY column1, column2

Upvotes: 2

Related Questions