MySQL

https://leetcode.com/problems/department-highest-salary/ Department Highest Salary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 처음 짠 쿼리 SELECT Top.Name AS Department, E1.Name AS Employee, E1.Salary FROM Employee AS E1 INNER JOIN (SELECT D.Name, E.DepartmentId, MAX(Salary) AS S..
The Report - BETWEEN 범위 조건으로 JOIN 하기 report NOT : Names of those students who received a grade lower than 8. → if the grade is lower than 8, use "NULL" Ordering by grade in descending, than alphabetically More than one student with the same grade (1-7), ordering by marks in ascending order SELECT CASE WHEN G.grade >= 8 THEN S.Name ELSE NULL END AS Name, G.grade, S.Marks FROM Students S, Grades G..
Hanna 한나
'MySQL' 태그의 글 목록