본문 바로가기

SQL/LeetCode

(72)
[SQL] Daily Leads and Partners(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Daily Leads and Partners 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/daily-leads-and-partners/description/ 2. 문제 Column name Type date_id date make_name varchar lead_id int partner_id int [문제] For each date_id and make_name, find the number of distinct lead_id's and distinct partner_id's. 각 date_id 및 make_name에 대해 개별 lea..
[SQL] Invalid Tweets(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Invalid Tweets 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/invalid-tweets/description/ 2. 문제 Column name Type tweet_id int content varchar [문제] Write a solution to find the IDs of the invalid tweets. The tweet is invalid if the number of characters used in the content of the tweet is strictly greater than 15. 유효하지 않은 트윗의..
[SQL] Fix Names in a Table(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Fix Names in a Table 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/fix-names-in-a-table/description/ 2. 문제 Column name Type user_id int name varchar [문제] Write a solution to fix the names so that only the first character is uppercase and the rest are lowercase. 첫 글자만 대문자로 하고 나머지 글자는 소문자로 수정하는 문제입니다. 3. 제출 쿼리 및 설명 최종) CONCA..
[SQL] Average Time of Process per Machine(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Average Time of Process per Machine 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/average-time-of-process-per-machine/description/ 2. 문제 Column name Type machine_id int process_id int activity_type enum timestamp float [문제] There is a factory website that has several machines each running the same number of processes. Writ..
[SQL] Percentage of Users Attended a Contest(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Percentage of Users Attended a Contest 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/percentage-of-users-attended-a-contest/description/ 2. 문제 Column name Type user_id int user_name varchar Column name Type contest_id int user_id int [문제] Write a solution to find the percentage of the users registered in each contest round..
[SQL] Bank Account Summary II(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Bank Account Summary II 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/bank-account-summary-ii/description/ 2. 문제 Column name Type account int name varchar Column name Type trans_id int account int amount int transacted_on date [문제] Write a solution to report the name and balance of users with a balance higher than 10000. T..
[SQL] Patients With a Condition(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Patients With a Condition 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/patients-with-a-condition/description/ 2. 문제 Column name Type patient_id int patient_name varchar conditions varchar [문제] Write a solution to find the patient_id, patient_name, and conditions of the patients who have Type I Diabetes. Type I Diabetes al..
[SQL] Group Sold Products By The Date(LeetCode/Oracle) 안녕하세요! 이번 포스팅은 LeetCode에 있는 Group Sold Products By The Date 문제를 OracleDB로 풀어보려고 합니다! (모든 문제는 Oracle로 풀이하겠습니다.) 1. 문제 링크 : https://leetcode.com/problems/group-sold-products-by-the-date/description/ 2. 문제 Table Activities: Column name Type sell_date date product varchar [문제] Write a solution to find for each date the number of different products sold and their names. The sold products names for ea..