Report: People with the same first and last name ordered by number

From TNG_Wiki
Jump to navigation Jump to search

Description: People with the same first and last name ordered by number, useful to search for duplicates.

Copy and paste the text between the lines into the reports section below "OR Leave Display, Criteria and Sort fields blank and enter direct SQL SELECT statement here:" and give it the title you think is appropriate


SELECT lastname, firstname, COUNT(CONCAT(lastname, firstname)) AS Number FROM tng_people GROUP BY lastname, firstname HAVING COUNT(CONCAT(lastname, firstname))>1 ORDER BY Number DESC, lastname, firstname