https://leetcode.com/problems/sales-person/ Sales Person - 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 믿기진 않지만 best와 동일 select name from SalesPerson where sales_id not in (select distinct sales_id from Orders where com_id = (select com_id from Company where name = 'RED'))
전체 글
내공냠냠https://leetcode.com/problems/rising-temperature/ Rising Temperature - 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 a.id as Id from Weather as a join Weather as b on DATEDIFF(a.recordDate, b.recordDate) = 1 and a.temperature > b.temperature solution comment 에는 id 를 가지고 하는..
https://leetcode.com/problems/article-views-i/ Article Views I - 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 distinct a.author_id as id from Views as a where a.author_id = a.viewer_id order by id best SELECT AUTHOR_ID AS ID FROM VIEWS WHERE AUTHOR_ID=VIEWER_ID GROUP BY I..
https://leetcode.com/problems/customer-who-visited-but-did-not-make-any-transactions/ Customer Who Visited but Did Not Make Any Transactions - 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 문제 이해하는 데 오래걸렸다. 처음에는 이해를 못해서 discussion 으로 찾아보았고, 그래도 모르겠어서 다음날 다시 도전했더니 이해가 되었다. select v..
https://leetcode.com/problems/min-cost-climbing-stairs/ Min Cost Climbing Stairs - 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 class Solution { public: int minCostClimbingStairs(vector& cost) { // 10, 15, 20, 0 // 0, 1, 2, 3 cost.push_back(0); for(int i = cost.size() - 3; i >= ..
https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 class Solution { public: int climbStairs(int n) { int a = 1, b = 1, temp = 0; for(int i = 2; i
https://leetcode.com/problems/second-highest-salary/submissions/ Second 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 max(salary) as SecondHighestSalary from Employee where salary < (select max(salary) from Employee); /* select salary as SecondHighestSalar..
https://leetcode.com/problems/tree-node/ Tree Node - 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 id, case when p_id is null then 'Root' when id in (select distinct p_id from Tree) then 'Inner' else 'Leaf' end as type from Tree; best select id, IF(ISNULL(p_id), 'Root', IF..