Last answered:

02 Dec 2022

Posted on:

01 Dec 2022

1

using group by to solve duplicates

I don't understand how does group by solve the problem of duplicates, can I have more explanation ?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

02 Dec 2022

0

Hi Omar!
Thanks for reaching out.

The reason for removing duplicates using the GROUP BY clause is because this clause groups the result set by some column and thus we do not have any duplicates.

The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each country". The GROUP BY statement is often used with aggregate functions (COUNT(), MAX(), MIN(), SUM(), AVG()) to group the result-set by one or more columns.

Hope this helps.
Best,
Tsvetelin

Submit an answer