inblog logo
|
silver
    SQL문제풀기

    [SQL문제풀기] Salaries Differences

    silver's avatar
    silver
    Nov 26, 2025
    [SQL문제풀기] Salaries Differences
    Contents
    문제MySQL

    문제

    StrataScratch - Salaries Differences
    StrataScratch
    StrataScratch - Salaries Differences
    https://platform.stratascratch.com/coding/10308-salaries-differences?code_type=3

    MySQL

    내가 작성한 정답

    with a as (select max(e.salary) s from db_employee e join db_dept d on e.department_id = d.id and d.department in ('engineering','marketing') group by e.department_id) select max(s)- min(s) from a;
    Share article

    silver

    RSS·Powered by Inblog