Skip to content
    SeaCode
    Learning tracksCode ArenaWorkshops & EventsInstructors
    Log inSign up
    Practice problems / Duplicate emails

    Duplicate emails

    Easysqlgroup byhaving

    Return every email that appears more than once in users (each email once in the result). Order doesn't matter.

    Tables

    • users (id INTEGER, email TEXT)

    Example 1

    users

    idemail
    1a@x.com
    2b@x.com
    3a@x.com

    Expected result

    email
    a@x.com

    Constraints

    • 0 ≤ rows ≤ 1000
    • Any row order is accepted

    Submit checks your solution against 7 tests, including hidden ones.

    SQL
    -- Write one SELECT query. Tables: users
    SELECT
    
    Sign in to run
    SeaCode

    Learn to code for real, online or at our branch in front of Cairo University, Giza.

    Learn

    • All courses
    • Interactive tutorials
    • Interview practice problems
    • Mock interview
    • Learning tracks
    • Code Arena
    • Workshops & Events
    • Knowledge library
    • Team projects

    Your account

    • Log in
    • Sign up
    • Learning plan
    • Certificates
    • Site map

    Contact us

    • WhatsApp
    • 010 9094 1104
    • In front of Cairo University, Giza

    © 2026 SeaCode. All rights reserved.