For example, if we want to print distinct values of “ColumnA, ColumnB, and ColumnC”, we use group by all the three columns. The following query is the simplest and easiest way to remove duplicate rows in SQL.
SELECT distinct ColumnA, ColumnB, ColumnC
FROM table_name
You can go through this SQL tutorial blog for more such simple tricks.