일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- 코딩테스트
- SQL
- HackerRank
- tensorflow
- 프로그래머스
- Product Demand
- eda
- ProfileReport
- 신경쓰기의 기술
- 데이터분석
- ModelCheckPoint
- Labor Management System
- Gaimification
- SKU Consolidation
- 파이썬
- oracle
- 웨어하우스 보관 최적화
- ABC Analysis
- pandas profiling
- forecast
- 피그마인디언
- 딥러닝
- 코딩테스트연습
- kaggle
- 당신의 인생이 왜 힘들지 않아야 한다고 생각하십니까
- MS SQL Server
- TensorFlowGPU
- leetcode
- MySQL
- Inventory Optimization
- Today
- Total
목록분류 전체보기 (177)
오늘도 배운다

문제 source: LeetCode If the customer's preferred delivery date is the same as the order date, then the order is called immediate; otherwise, it is called scheduled. The first order of a customer is the order with the earliest order date that the customer made. It is guaranteed that a customer has precisely one first order. Write an SQL query to find the percentage of immediate orders in the first..

문제 source: LeetCode 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. 제출답안(MS SQL Server) WITH trxs AS( SELECT id, country, amount, trans_date, FORMAT(trans_date, 'yyyy-MM') AS year_month, CASE WHEN state LIKE 'approved' THEN 1 ELSE 0 END is_ap..

문제 source: LeetCode Write an SQL query that selects the product id, year, quantity, and price for the first year of every product sold. Return the resulting table in any order. 제출답안(MySQL) SELECT product_id, year AS first_year, quantity, price FROM sales WHERE (product_id, year) IN (SELECT product_id, MIN(year) as first_year FROM sales GROUP BY product_id) 문제 바로가기(MySQL)

문제 source: LeetCode Write an SQL query to report the sum of all total investment values in 2016 tiv_2016, for all policyholders who: - have the same tiv_2015 value as one or more other policyholders, and - are not located in the same city like any other policyholder (i.e., the (lat, lon) attribute pairs must be unique). Round tiv_2016 to two decimal places. The query result format is in the foll..

문제 source: LeetCode Write an SQL query to report the managers with at least five direct reports. Return the result table in any order. The query result format is in the following example. 제출답안(MS SQL Server) WITH cnt_mng_by_name AS (SELECT managerId AS id, COUNT(id) AS cnt_sub FROM employee GROUP BY managerId) SELECT name FROM cnt_mng_by_name AS cnt_mng JOIN employee AS emp ON cnt_mng.id = emp.i..

문제 source: 프로그래머 CAR_RENTAL_COMPANY_RENTAL_HISTORY 테이블에서 대여 시작일을 기준으로 2022년 8월부터 2022년 10월까지 총 대여 횟수가 5회 이상인 자동차들에 대해서 해당 기간 동안의 월별 자동차 ID 별 총 대여 횟수(컬럼명: RECORDS) 리스트를 출력하는 SQL문을 작성해주세요. 결과는 월을 기준으로 오름차순 정렬하고, 월이 같다면 자동차 ID를 기준으로 내림차순 정렬해주세요. 특정 월의 총 대여 횟수가 0인 경우에는 결과에서 제외해주세요. 제출답안(MySQL) WITH hist_aug_thru_oct AS (SELECT *, MONTH(start_date) AS month FROM car_rental_company_rental_history WHER..
문제 source: 프로그래머 CAR_RENTAL_COMPANY_CAR 테이블과 CAR_RENTAL_COMPANY_RENTAL_HISTORY 테이블과 CAR_RENTAL_COMPANY_DISCOUNT_PLAN 테이블에서 자동차 종류가 '세단' 또는 'SUV' 인 자동차 중 2022년 11월 1일부터 2022년 11월 30일까지 대여 가능하고 30일간의 대여 금액이 50만원 이상 200만원 미만인 자동차에 대해서 자동차 ID, 자동차 종류, 대여 금액(컬럼명: FEE) 리스트를 출력하는 SQL문을 작성해주세요. 결과는 대여 금액을 기준으로 내림차순 정렬하고, 대여 금액이 같은 경우 자동차 종류를 기준으로 오름차순 정렬, 자동차 종류까지 같은 경우 자동차 ID를 기준으로 내림차순 정렬해주세요. 제출답안(My..
문제 source: 프로그래머 CAR_RENTAL_COMPANY_CAR 테이블과 CAR_RENTAL_COMPANY_RENTAL_HISTORY 테이블과 CAR_RENTAL_COMPANY_DISCOUNT_PLAN 테이블에서 자동차 종류가 '트럭'인 자동차의 대여 기록에 대해서 대여 기록 별로 대여 금액(컬럼명: FEE)을 구하여 대여 기록 ID와 대여 금액 리스트를 출력하는 SQL문을 작성해주세요. 결과는 대여 금액을 기준으로 내림차순 정렬하고, 대여 금액이 같은 경우 대여 기록 ID를 기준으로 내림차순 정렬해주세요. 제출답안(MySQL) WITH ls_truck AS(SELECT * FROM car_Rental_company_car WHERE car_type = '트럭'), rent_info AS (SEL..