Skip to content
    SeaCode
    Learning tracksCode ArenaWorkshops & EventsInstructors
    Log inSign up
    Practice problems / Students with no enrollment

    Students with no enrollment

    Easysqlleft joinnull

    Return the name of every student with no row in enrollments, sorted by name.

    Tables

    • students (id INTEGER, name TEXT, city TEXT, xp INTEGER)
    • enrollments (student_id INTEGER, course_id INTEGER)

    Example 1

    students

    idnamecityxp
    1MonaCairo10
    2OmarGiza20
    3LailaCairo30

    enrollments

    student_idcourse_id
    110
    111
    310

    Expected result

    name
    Omar

    Constraints

    • 0 ≤ rows ≤ 1000
    • The order of rows matters

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

    SQL
    -- Write one SELECT query. Tables: students, enrollments
    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.