리트코드에 있는 1179. Reformat Department Table를 푸는 데에 3시간을 썼다 ^^ 하.하.하. 새롭게 알게 된 내용이 있어 정리할 겸 쓰는 글 https://leetcode.com/problems/reformat-department-table
https://www.hackerrank.com/challenges/earnings-of-employees/problem?h_r=internal-search 문제에서 알려준 것 : 총 소득 = 월급 x 근무개월 Maximum total earnings를 밝히고 Ma

https://www.hackerrank.com/challenges/what-type-of-triangle/problem?h_r=internal-search 맨 처음 시도 A = B AND B = C 대신 A = B = C와 같이 사용할 수 없음을 알게 되었다! 두
https://leetcode.com/problems/reformat-department-table/ 이전에 내가 작성한 글을 보면 알겠지만 이 문제에서 도대체 왜 SUM함수를 쓰는지 알 수가 없었고 선미님께서 작성해주신 답변 댓글과 모든 것을 종합해봐도 이해가 안가
https://leetcode.com/problems/customers-who-never-order/Write an SQL query to report all customers who never order anything.Return the result tab
https://leetcode.com/problems/employees-earning-more-than-their-managers/Write an SQL query to find the employees who earn more than their manage
https://leetcode.com/problems/rising-temperature/Write an SQL query to find all dates' Id with higher temperatures compared to its previous dates
COUNT와 SUM의 집계 방식에 있어 차이가 있음에도개념이 확실히 잡히지 않은 것 같아 한참을 헤맸다.정리하기 위해 쓰는 글!https://solvesql.com/problems/bike-rent-stats/동일한 문제에 대해서 각각 COUNT와 SUM을 사

https://www.hackerrank.com/challenges/earnings-of-employees/problem?h_r=internal-search풀이 1. 제일 쉬운(?) 방법풀이 2. WHERE 절 서브쿼리 활용풀이 3. HAVING 절 서브쿼리

https://leetcode.com/problems/department-highest-salary/Write an SQL query to find employees who have the highest salary in each of the departmen
https://www.hackerrank.com/challenges/the-report/problem?h_r=internal-search주어진 테이블 : Students, Grades조회할 데이터 : 학생들의 이름, 등급, 점수조건 1 : 등급이 높은 순서로

https://leetcode.com/problems/consecutive-numbers/조회할 데이터 : 3번 연속 나오는 숫자를 출력하기\- id가 1씩 높아진다는 점을 이용해서 셀프조인 (다음 아이디)\- 3번 연속 같은 숫자가 나와야 하므로 id+2를

https://leetcode.com/problems/consecutive-numbers/조회할 데이터 : 3번 연속 나오는 숫자를 출력하기LAG 함수 사용LEAD 함수 사용

https://leetcode.com/problems/department-top-three-salaries/A company's executives are interested in seeing who earns the most money in each of t
정규표현식 튜토리얼 : https://regexone.com/lesson/letters_and_digits?정규표현을 테스트 해 볼 수 있는 사이트 : https://regexr.com\-- 01. Weather Observation Station 6
2017년 1월 한 달 동안 발생한 주문의 배송 예측이 정확했는지 분석을 하려고 합니다. 고객의 구매 일자별로 배송 예정 시각 안에 고객에게 도착한 주문과, 배송 예정 시각이 지나서 고객에게 도착한 주문을 각각 집계하는 쿼리를 작성해주세요.배송 완료 또는 배송 예정 시
WHERE 절 서브쿼리(1) 단일행 서브쿼리 (✨중요)\-- 비교연산자와 함께 사용 (=, >, < 등)\-- 비교연산자를 사용하기 때문에 서브쿼리로 출력한 결과값은 반드시 단 1개만 나와야 한다.(2) 다중행 서브쿼리 (✨중요)\-- IN, NOT IN과 함께

https://leetcode.com/problems/swap-salary/description/테이블 내 sex 컬럼에서 값이 m인 것은 f로, f인 것은 m으로 변경
https://www.hackerrank.com/challenges/challenges/problem?h_r=internal-searchHAVING 절에challenges_created = max(challenges_created),challenges_crea
https://solvesql.com/problems/ott-used-by-amy/아래 다섯 가지 정보를 포함한 2021년 개봉 영화 목록을 출력하는 쿼리를 작성해주세요.플랫폼별로 영화를 볼 수 있는지 없는지는 netflix, hulu, prime_video,
Q. https://solvesql.com/problems/characteristics-of-orders/☑️ pointCASE문 사용 후 컬럼이 1개만 나와야하는데 여러 컬럼으로 나뉘어 null 값이 나올 경우 -> SUM 함수를 사용해서 대표값 지정!! (
Q. https://solvesql.com/problems/refund-austria/☑️ pointABS( ) -> 절대값 반환
Q. https://solvesql.com/problems/sales-per-country/
Q. https://solvesql.com/problems/bargain-sale/
1\. 첫 주문과 마지막 주문Q. https://solvesql.com/problems/first-and-last-orders/2\. 많이 주문한 테이블 찾기Q. https://solvesql.com/problems/find-tables-with-hi
Q. https://solvesql.com/problems/estimated-delivery-date/