티스토리챌린지22 [LAG, LEAD] Exchange Seats 링크https://leetcode.com/problems/exchange-seats/description/문제Write a solution to swap the seat id of every two consecutive students. If the number of students is odd, the id of the last student is not swapped.Return the result table ordered by id in ascending order.The result format is in the following example.정답select id, case when id % 2 = 0 then lag(student) over (order by id) .. 2024. 11. 8. [UNION] Count Salary Categories 링크https://leetcode.com/problems/count-salary-categories/description/ 문제Write a solution to calculate the number of bank accounts for each salary category. The salary categories are:"Low Salary": All the salaries strictly less than $20000."Average Salary": All the salaries in the inclusive range [$20000, $50000]."High Salary": All the salaries strictly greater than $50000.The result table must co.. 2024. 11. 7. 이전 1 2 다음