1581. Customer Who Visited but Did Not Make Any Transactions table: Visits+-------------+---------+| Column Name | Type |+-------------+---------+| visit_id | int || customer_id | int |+-------------+---------+visit_id is the column with unique values for this table.This table contains information about the customers who visited the mall. Table: Transactions+----------------+-----..
1683. Invalid Tweets Table: Tweets+----------------+---------+| Column Name | Type |+----------------+---------+| tweet_id | int || content | varchar |+----------------+---------+tweet_id is the primary key (column with unique values) for this table.content consists of alphanumeric characters, '!', or ' ' and no other special characters.This table contains all the tweets i..
문제https://school.programmers.co.kr/learn/courses/30/lessons/131534 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr✍️ 문제 요약2021년에 가입한 전체 회원들 중 상품을 구매한 회원수와 상품을 구매한 회원의 비율(2021년에 가입한 회원 중 상품을 구매한 회원수 / 2021년에 가입한 전체 회원 수)구매날짜의 년, 월로 출력소수 둘째자리에서 반올림년을 기준으로 오름차순, 월을 기준으로 오름차순▼ 결과 예시더보기내가 작성한 코드WITH y_2021 AS ( select * from user_info where joined between '2021..
https://query-test-mu.vercel.app/?set=3&problem=48 https://query-test-mu.vercel.app/?problem=48&set=3 query-test-mu.vercel.app1번 풀이(정답)-- 생존 대비 GNP가 감소한 국가-- 인구가 1억 명 이상의 국가-- 이전 연도 GNP 값이 0이면 null인 경우는 제외SELECT count(name) as country_countFROM ( select * from country as c where c.GNP = 10000000문제점조금 어렵게 생객했었나, 어쩌다 서브쿼리를 쓰게 되었나 ?운이 좋게 정답이긴 했지만, 0 과 null 값 인 것은 제외를 해주는 부분에서는 미흡했다. 해설-- 해설selec..
세션2회차 문제2번프로그래머스 문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/164668 > 내 풀이 : join 과 having 으로 필터링햔 풀이SELECT u.user_id , u.nickname , SUM(price) AS TOTAL_PRICEFROM used_goods_board AS bLEFT JOIN used_goods_user AS uON b.writer_id=u.user_idWHERE b.status = 'DONE'GROUP BY u.user_id, u.nicknameHAVING SUM(price) >= '700000'ORDER BY TOTAL_PRICE ASC; > from절 서브쿼리 풀이SE..
문제 https://school.programmers.co.kr/learn/courses/30/lessons/151141 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr✍️ 문제 요약 자동차 종류 '트럭'의 자동차 대여 기록기록별로 대여 금액(FEE)를 구하고대여기록ID / 대여 금액 리스트 출력대여 금액 내림차순, 대여기록 id 내림차순내가 작성한 코드WITH truck AS ( SELECT car_id, car_type, daily_fee FROM car_rental_company_car WHERE car_type = '트럭'),history AS ( SELECT h.history_id,..