Skip to content
    SeaCode
    Learning tracksCode ArenaWorkshops & EventsInstructors
    Log inSign up
    Practice problems / Top students in Cairo

    Top students in Cairo

    Easysqlselectwhereorder by

    Return name and xp for students in the city Cairo with an xp of 100 or more. Sort by xp from highest to lowest, then by name alphabetically.

    Tables

    • students (id INTEGER, name TEXT, city TEXT, xp INTEGER)

    Example 1

    students

    idnamecityxp
    1MonaCairo340
    2OmarGiza500
    3LailaCairo90
    4YoussefCairo340
    5SalmaCairo100

    Expected result

    namexp
    Mona340
    Youssef340
    Salma100

    Constraints

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

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

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