{ "data": { "question": { "questionId": "182", "questionFrontendId": "182", "boundTopicId": null, "title": "Duplicate Emails", "titleSlug": "duplicate-emails", "content": "

Table: Person

\n\n
\n+-------------+---------+\n| Column Name | Type    |\n+-------------+---------+\n| id          | int     |\n| email       | varchar |\n+-------------+---------+\nid is the primary key column for this table.\nEach row of this table contains an email. The emails will not contain uppercase letters.\n
\n\n

 

\n\n

Write an SQL query to report all the duplicate emails.

\n\n

Return the result table in any order.

\n\n

The query result format is in the following example.

\n\n

 

\n

Example 1:

\n\n
\nInput: \nPerson table:\n+----+---------+\n| id | email   |\n+----+---------+\n| 1  | a@b.com |\n| 2  | c@d.com |\n| 3  | a@b.com |\n+----+---------+\nOutput: \n+---------+\n| Email   |\n+---------+\n| a@b.com |\n+---------+\nExplanation: a@b.com is repeated two times.\n
\n", "translatedTitle": null, "translatedContent": null, "isPaidOnly": false, "difficulty": "Easy", "likes": 1049, "dislikes": 46, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\": {\"Person\": [\"id\", \"email\"]}, \"rows\": {\"Person\": [[1, \"a@b.com\"], [2, \"c@d.com\"], [3, \"a@b.com\"]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": [ { "lang": "MySQL", "langSlug": "mysql", "code": "# Write your MySQL query statement below\n", "__typename": "CodeSnippetNode" }, { "lang": "MS SQL Server", "langSlug": "mssql", "code": "/* Write your T-SQL query statement below */\n", "__typename": "CodeSnippetNode" }, { "lang": "Oracle", "langSlug": "oraclesql", "code": "/* Write your PL/SQL query statement below */\n", "__typename": "CodeSnippetNode" } ], "stats": "{\"totalAccepted\": \"347.2K\", \"totalSubmission\": \"504.3K\", \"totalAcceptedRaw\": 347247, \"totalSubmissionRaw\": 504259, \"acRate\": \"68.9%\"}", "hints": [], "solution": { "id": "214", "canSeeDetail": true, "paidOnly": false, "hasVideoSolution": false, "paidOnlyVideo": true, "__typename": "ArticleNode" }, "status": null, "sampleTestCase": "{\"headers\": {\"Person\": [\"id\", \"email\"]}, \"rows\": {\"Person\": [[1, \"a@b.com\"], [2, \"c@d.com\"], [3, \"a@b.com\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Person (id int, email varchar(255))\"\n ],\n \"mssql\": [\n \"Create table Person (id int, email varchar(255))\"\n ],\n \"oraclesql\": [\n \"Create table Person (id int, email varchar(255))\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Person (id int, email varchar(255))", "Truncate table Person", "insert into Person (id, email) values ('1', 'a@b.com')", "insert into Person (id, email) values ('2', 'c@d.com')", "insert into Person (id, email) values ('3', 'a@b.com')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"

MySQL 8.0.

\"], \"mssql\": [\"MS SQL Server\", \"

mssql server 2019.

\"], \"oraclesql\": [\"Oracle\", \"

Oracle Sql 11.2.

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }