Saturday, November 19, 2022

Find duplicates in value using SQL command

 SELECT

    username,

    email,

    COUNT(*)

FROM

    users

GROUP BY

    username,

    email

HAVING

    COUNT(*) > 1


or,

SELECT name, COUNT(*) c FROM table GROUP BY name HAVING c > 1;

No comments:

Post a Comment

How to select all blank cells in a range to keep unlocked in excel.

  Select Only the Blank Cells: Press Ctrl + G (or F5 ) to open the Go To dialog box. Click the Special... button at the bottom left. Sele...