[MEDIUN] New Companies
·
SQL/hacker rank
New Companies | HackerRank Find total number of employees. www.hackerrank.com 문제 조건 Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy: Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of emplo..
[608] Tree Node
·
SQL/leetcode
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 Table: Tree +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | p_id | int | +-------------+------+ id is the primary key column for this table. Each row of this table contains information a..
[EASY] Weather Observation Station 10
·
카테고리 없음
1. 문제 설명 Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 2. 문제 풀이 3. 결과 SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '[^AEIOU]$.*'
[EASY] Weather Observation Station 9
·
SQL/hacker rank
1. 문제 설명 Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 2. 문제 풀이 3. 결과 SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[^AEIOU].*'
[EASY] Weather Observation Station 8
·
SQL/hacker rank
1. 문제 설명 Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 2. 문제 풀이 3. 결과 SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP('^[AEIOU]') AND CITY REGEX..
[EASY] Weather Observation Station 7
·
SQL/hacker rank
1. 문제 설명 Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. 2. 문제 풀이 3. 결과 SELECT DISTINCT city FROM STSATION WHERE city REGEXO '[AEIOUaeiou]$.*'
[MySQL] DELETE JOIN 번역
·
SQL/개념
요약 : 해당 튜토리얼에서는 MySQL DELETE JOIN문을 이용하여 여러 테이블에서 데이터를 삭제하는 방법을 보여줍니다. 이전 튜토리얼에서 배운 내용 : 여러 테이블에 대한 단일 DELETE문 자식 테이블(child table)에 foreign key에 대한 ON DELETE CASCADE 참조 작업이 있는 여러 관련 테이블에 대한 단일 DELETE문 이번 튜토리얼에서는 DELETE문과 함께 INNER JOIN 또는 LEFT JOIN 절을 사용하여 여러 테이블에서 데이터를 삭제(제거)하는 보다 유연한 방법을 소개합니다. MySQL DELETE JOIN with INNER JOIN MySQL은 DELETE 문에서 INNER JOIN절을 사용하여 테이블에서 행을 삭제하고 다른 테이블에서 일치하는 행 도..
[196] Delete Duplicate Emails
·
SQL/leetcode
1. 문제 설명 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. ..