반응형 leetcode18 [SQL] 197. Rising Temperature 목차 문제 Table: Weather +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | recordDate | date | | temperature | int | +---------------+---------+ id is the primary key for this table. This table contains information about the temperature on a certain day. Write an SQL query to find all dates' Id with higher temperatures compared to its previous dates (yeste.. 코딩테스트/SQL 문제풀이 2023. 1. 14. [SQL] 182. Duplicate Emails 목차 문제 Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this table. Each row of this table contains an email. The emails will not contain uppercase letters. Write an SQL query to report all the duplicate emails. Return the result table in any order. The query result .. 코딩테스트/SQL 문제풀이 2023. 1. 14. [SQL] 181. Employees Earning More Than Their Managers 목차 문제 Table: Employee +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | salary | int | | managerId | int | +-------------+---------+ id is the primary key column for this table. Each row of this table indicates the ID of an employee, their name, salary, and the ID of their manager. Write an SQL query to find the employees who earn more t.. 코딩테스트/SQL 문제풀이 2023. 1. 14. [SQL] 175. Combine Two Tables 목차 문제 Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | personId | int | | lastName | varchar | | firstName | varchar | +-------------+---------+ personId is the primary key column for this table. This table contains information about the ID of some persons and their first and last names. Table: Address +-------------+---------+ | Column Name | Type | +--.. 코딩테스트/SQL 문제풀이 2023. 1. 14. [JAVA] 101. Symmetric Tree 목차 문제 Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Example 1: Input: root = [1,2,2,3,4,4,3] Output: true Example 2: Input: root = [1,2,2,null,3,null,3] Output: false Constraints: The number of nodes in the tree is in the range [1, 1000]. -100 코딩테스트/알고리즘 문제풀이 2022. 12. 29. [JAVA] 100. Same Tree 목차 문제 Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical, and the nodes have the same value. Example 1: Input: p = [1,2,3], q = [1,2,3] Output: true Example 2: Input: p = [1,2], q = [1,null,2] Output: false Example 3: Input: p = [1,2,1], q = [1,1,2] Output: false Constrain.. 코딩테스트/알고리즘 문제풀이 2022. 12. 29. [JAVA] 94. Binary Tree Inorder Traversal 목차 문제 Given the root of a binary tree, return the inorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,3,2] Example 2: Input: root = [] Output: [] Example 3: Input: root = [1] Output: [1] Constraints: The number of nodes in the tree is in the range [0, 100]. -100 코딩테스트/알고리즘 문제풀이 2022. 12. 28. [MySQL/MSSQL] 196. Delete Duplicate Emails 목차 문제 Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this table. Each row of this table contains an email. The emails will not contain uppercase letters. Write an SQL query to delete all the duplicate emails, keeping only one unique email with the smallest id. Not.. 코딩테스트/SQL 문제풀이 2022. 12. 28. [MySQL/Oracle] 627. Swap Salary 목차 문제 Table: Salary +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | name | varchar | | sex | ENUM | | salary | int | +-------------+----------+ id is the primary key for this table. The sex column is ENUM value of type ('m', 'f'). The table contains information about an employee. Write an SQL query to swap all 'f' and 'm' values (i.e., change all 'f' v.. 코딩테스트/SQL 문제풀이 2022. 11. 11. [MySQL/Oracle] 1873. Calculate Special Bonus 목차 문제 Table: Employees +-------------+---------+ | Column Name | Type | +-------------+---------+ | employee_id | int | | name | varchar | | salary | int | +-------------+---------+ employee_id is the primary key for this table. Each row of this table indicates the employee ID, employee name, and salary. Write an SQL query to calculate the bonus of each employee. The bonus of an employee is 100%.. 코딩테스트/SQL 문제풀이 2022. 11. 11. [JAVA] 326. Power of Three 목차 문제 Given an integer n, return true if it is a power of three. Otherwise, return false. An integer n is a power of three, if there exists an integer x such that n == 3x. Example 1: Input: n = 27 Output: true Explanation: 27 = 33 Example 2: Input: n = 0 Output: false Explanation: There is no x where 3x = 0. Example 3: Input: n = -1 Output: false Explanation: There is no x where 3x = (-1). Const.. 코딩테스트/알고리즘 문제풀이 2022. 11. 9. [MySQL/Oracle] 1693. Daily Leads and Partners 목차 문제 Table: DailySales +-------------+---------+ | Column Name | Type | +-------------+---------+ | date_id | date | | make_name | varchar | | lead_id | int | | partner_id | int | +-------------+---------+ This table does not have a primary key. This table contains the date and the name of the product sold and the IDs of the lead and partner it was sold to. The name consists of only lowercase E.. 코딩테스트/SQL 문제풀이 2022. 11. 8. 이전 1 2 다음 반응형