목록Data Analyst/daily (50)
rubus0304 님의 블로그
96. Monthly Transactions Ihttps://leetcode.com/problems/monthly-transactions-i/description/ Write an SQL query to find for each month and country, the number of transactions and their total amount, the number of approved transactions and their total amount.Return the result table in any order. (시도) 월별, 국가별로 뽑고, 거래횟수는 count로 뽑았는데, group by를 1로 해도 2로 해도 3개가 나오지 않는다. 그리고 나머지는 서브쿼리로 해야하는건가select d..
95. Queries Quality and Percentagehttps://leetcode.com/problems/queries-quality-and-percentage/ We define query quality as:The average of the ratio between query rating and its position.We also define poor query percentage as:The percentage of all queries with rating less than 3.Write a solution to find each query_name, the quality and poor_query_percentage.Both quality and poor_query_percentage..
https://leetcode.com/problems/percentage-of-users-attended-a-contest/description/ 94. Percentage of Users Attended a ContestWrite a solution to find the percentage of the users registered in each contest rounded to two decimals.Return the result table ordered by percentage in descending order. In case of a tie, order it by contest_id in ascending order.The result format is in the following examp..
보호되어 있는 글입니다.
https://leetcode.com/problems/average-selling-price/description/ 92. Average Selling Price Write a solution to find the average selling price for each product. average_price should be rounded to 2 decimal places. If a product does not have any sold units, its average selling price is assumed to be 0.Return the result table in any order. (오답)select u.product_id, avg(price) average_pricef..
https://leetcode.com/problems/not-boring-movies/description/ 91. Not Boring Movies Write a solution to report the movies with an odd-numbered ID and a description that is not "boring".Return the result table ordered by rating in descending order. select *from Cinemawhere mod(id,2)=1 and description 'boring'order by rating desc
90. Cofirmation Ratehttps://leetcode.com/problems/confirmation-rate/ The confirmation rate of a user is the number of 'confirmed' messages divided by the total number of requested confirmation messages. The confirmation rate of a user that did not request any confirmation messages is 0. Round the confirmation rate to two decimal places.Write a solution to find the confirmation rate of each user...
[4기] QCC - 1회차 [4기] QCC - 1회차 | Notion셋팅 안내teamsparta.notion.site 1문제 Sales_SalesOrderDetail은 SalesOrderID를 통해 Sales_SalesOrderHeader와 외래 키 관계를 가집니다. 각 판매 주문 세부 정보는 특정 판매 주문 ID에 속합니다.Sales_SalesOrderHeader는 CustomerID를 통해 Sales_Customer 테이블과 외래 키 관계를 가집니다. 각 판매 주문 ID는 특정 고객과 연결되어 있습니다.Sales_Customer는 PersonID를 통해 Person_Person 테이블(BusinessEntityID)과 외래 키 관계를 가집니다. 이는 각 고객이 하나의 개인 정보와 연결됨을 의미합니다...
89. Managers with at leat5 direct reportshttps://leetcode.com/problems/managers-with-at-least-5-direct-reports/description/ Write a solution to find managers with at least five direct reports.Return the result table in any order. 문제 이해하기가 난해함. 토익인생 15년동안 direct reports '직속부하'란 단어 오늘 처음 봄. 당황..리트코드 덕분에 단어공부함ㅋㅋ 직속부하 5명을 둔 매니저를 찾는데, Input table 에서 id하고 managerID를 왜 같다고 연결하는 건지 모르겠음.마지막 Output에 Joh..
87. Employee Bonus https://leetcode.com/problems/employee-bonus/description/Write a solution to report the name and bonus amount of each employee with a bonus less than 1000.Return the result table in any order. (오답) 보너스가 1000 이하인 값과 Null 값을 같이 구해야하는데, 결과가 왜 안 나올까select a.name, b.bonusfrom employee a left join bonus b on a.empID = b.empIDwhere b.bonus 1000 and b.bonus is nullgroup by ..