zetawiki 제타위키 위키 포럼 도구

HR-SQL Top Earners

역링크 토론
  • 역사 보기
  • 인쇄용 판
  • 고유 링크
  • 문서 정보
    • 해커랭크 SQL

    목차

    • 1 개요
    • 2 MySQL

    개요

    HR-SQL Top Earners
    • https://www.hackerrank.com/challenges/earnings-of-employees/problem
    해커랭크 SQL
    문제 DB2 MS SQL MySQL Oracle
    HR-SQL Aggregation e
    HR-SQL Revising Aggregations - The Count Function
    HR-SQL Revising Aggregations - The Sum Function
    HR-SQL Revising Aggregations - Averages
    HR-SQL Average Population
    HR-SQL Japan Population
    HR-SQL Population Density Difference
    HR-SQL The Blunder
    HR-SQL Top Earners
    HR-SQL Weather Observation Station 2
    HR-SQL Weather Observation Station 13
    HR-SQL Weather Observation Station 14
    HR-SQL Weather Observation Station 15
    HR-SQL Weather Observation Station 16
    HR-SQL Weather Observation Station 17
    HR-SQL Weather Observation Station 18
    HR-SQL Weather Observation Station 19
    HR-SQL Weather Observation Station 20

    MySQL

    SELECT salary*months AS earnings, COUNT(*) FROM Employee
    GROUP BY earnings
    ORDER BY earnings DESC
    LIMIT 1;
    
    SELECT salary*months AS earnings, COUNT(*) FROM Employee
    WHERE salary*months=(SELECT MAX(salary*months) FROM Employee)
    GROUP BY earnings;
    
    원본 주소 "https://zetawiki.com/w/index.php?title=HR-SQL_Top_Earners&oldid=766722"