til
-
12/21스파르타/TIL(Today I Learned) 2023. 12. 21. 18:20
오늘은 프로젝트 마무리를 하였다. 그동안 공부하던 내용을 코드로 정리하고 데이터 시각화를 해서 팀원들과 소통하면서 프로젝트 준비를 마쳤다. Colab의 공유 기능으로 같이 코드를 작성해가면서 오류를 수정했고, 팀 노션에 프로젝트 관한 내용을 하나씩 채워나갔다. 혼자였다면 막막하기도 하고 채우기도 힘들었겠지만 팀원들과 함께해서 할 수 있었다. 팀원분들 중 한 분이 알려주신 f-string이 신기하였다. for문을 통해 boxplot을 반복적으로 출력하고 label을 자동으로 입력하는 걸 알려줬는데 처음보는 문법인데 배워두면 유용하겠다라는 생각이 들어서 고마웠다 내일 프로젝트의 발표인데 말을 절지 않고 성공적으로 마무리를 하였으면 좋겠다
-
12/13스파르타/TIL(Today I Learned) 2023. 12. 13. 14:45
1174. Immediate Food Delivery II 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 a solution to find the percentage of immediate orders i..
-
12/11스파르타/TIL(Today I Learned) 2023. 12. 11. 15:55
1251. Average Selling Price 이 사이트의 문제를 풀 때 영어로 된 문제이다 보니 해석하고 설명 보면서 코딩을 하는데 설명만 보고서 코딩을 하니 오류가 나왔다. 실수를 돌이켜 보면 1. join 조건에서 product_id만 연결한 것이였다. 실제로 주어진 예시의 테이블을 보면 group by 로 묶어도 같은 product_id임에도 구매날짜에 따라 다르게 계산이 되어야한다. 이것을 고려하지 않고 코딩을 하여 첫번째 문제가 생겼다. join 조건에 u.purchase_date between p.start_date and p.end_date 를 추가하여 해결하였다. 2. 바로 ifnull을 생각치도 못했다. 일단 예시를 보면 생각 할 일이 없었기 때문이다. 하지만 실무를 하다보면 구매를..
-
12/08스파르타/TIL(Today I Learned) 2023. 12. 8. 15:41
오늘의 문제 풀이 시작 매번 풀번 프로그래머스가 아닌 다른 외국 사이트에서 문제를 풀고 있다 사이트 이름은 leetcode.com 이다 오늘의 문제 1661. Average Time of Process per Machine There is a factory website that has several machines each running the same number of processes. Write a solution to find the average time each machine takes to complete a process 여기 사이트는 예시가 잘 나오고 설명도 잘 써있어서 이해는 잘 된다. 그저 내 코딩이 막히는 뿐... 외국 코딩러들이 한 풀이를 봤는데 사람들은 재귀호출을 야무딱지게 하..
-
12/07스파르타/TIL(Today I Learned) 2023. 12. 7. 02:48
문제 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를 기준으로 내림차순 정렬해주세요. SELECT a.CAR_ID, a.CA..
-
12/5스파르타/TIL(Today I Learned) 2023. 12. 5. 16:30
오늘도 어김없이 프로그래머스 문제를 풀다가 막혀 !도움을 하던중 정말 깔끔하게 짠 코드를 보고 이해하며 감탄한 코드가 있어 가져와봤다. 문제 : 데이터 분석 팀에서는 우유(Milk)와 요거트(Yogurt)를 동시에 구입한 장바구니가 있는지 알아보려 합니다. 우유와 요거트를 동시에 구입한 장바구니의 아이디를 조회하는 SQL 문을 작성해주세요. 이때 결과는 장바구니의 아이디 순으로 나와야 합니다. cart_products의 테이블이다. 보면 name에 두가지 조건 1. name = 'Milk' 2. name = 'Yogurt' 를 동시에 만족해야 한다 하지만 그냥 코드를 한번에 작성해서 하려면 두 조건을 동시에 만족하기는 어렵다. 그래서 서브쿼리로 조건 한개를 처리한 후 나머지 조건을 처리하는 방법을 소개하..
-
12/01스파르타/TIL(Today I Learned) 2023. 12. 1. 16:53
프로그래머스_ 막힌 문제들 1) 재구매가 일어난 상품의 회원 리스트 구하기 문제 ONLINE_SALE 테이블에서 동일한 회원이 동일한 상품을 재구매한 데이터를 구하여, 재구매한 회원 ID와 재구매한 상품 ID를 출력하는 SQL문을 작성해주세요. 결과는 회원 ID를 기준으로 오름차순 정렬해주시고 회원 ID가 같다면 상품 ID를 기준으로 내림차순 정렬해주세요. 문제를 읽고 든 생각은 동일한 상품을 재 구매한 데이터를 구하기 위하여 user_id로 count(1)하여 갯수가 2이상인 것을 구하면 되겠다 싶어서 서브쿼리에 이 내용을 넣고 서브쿼리 밖에서 where문으로 2이상의 데이터를 찾았다. select aa.user_id, aa.product_id from ( SELECT user_id , product_..
-
내가 생각하는 데이터 분석의 핵심 역량스파르타/데일리 미션 2023. 11. 30. 13:15
내가 생각하는 데이터분석의 핵심 역량 이 전까지 TIL을 하면서 다양한 기업들의 채용공고를 보고 요구 사항, 우대 사항등을 보았다. 다수 기업에서 공통적으로 언급하는 요구 사항이 무엇인지를 생각해보니 데이터 분석가로서 기본적으로 데이터의 가설을 세우는 일이 중요하다. 가설을 세우고 문제를 정의한다. 정의한 문제를 실험 설계를 하여 분석을 한 뒤 결과로 나온 data로 결론를 도출한다. 핵심 역량 키워드 1. 가설과 문제를 정의 할 수 있는 사고력 2. 정의한 문제를 해결할 수 있는 SQL,Python 프로그래밍 능력 3. 나온 결과로 커뮤니케이션을 해야하는 협업 능력