목록SQL/데이터리안 SQL 분석 (8)
now is better than never
https://mode.com/sql-tutorial/understanding-search-functionality/ Understanding Search Functionality | SQL Analytics Training - Mode In this lesson we'll cover: Before starting, be sure to read the overview to learn a bit about Yammer as a company. The product team is determining priorities for the next development cycle and they are considering improving the site's search functionality mode.com..
5. 정규표현식 (Regular Expression) 문자열에서 특정 패턴을 찾아내는 것 예시) 자음/모음으로 시작, 문자열에 숫자 3개 이상, 이메일 패턴 등 REGEXP '^[string].*' ^ : 시작 .* : 뒤에 어떤 것이 와도 매치 = LIKE % \d : 어떤 숫자든 매치 -> SQL은 대소문자 구별 안 함 (파이썬 자바 등 다른 언어는 구별함) 연습문제 1) 모음으로 시작하고 끝나는 문자열? REGEXP ' ^[aeiou].*[aeiou]$ ' 2) 모음으로 시작하지 않는 문자열? NOT REGEXP '^[aeiou]' 6. 사용자 정의 함수 CREATE FUNCTION function_name (parameter_name, data_type) RETURNS data_type (DETE..
출처: https://www.datarian.io/blog/utm-parameter?utm_source=sql-camp&utm_medium=camp&utm_campaign=referral&utm_content=sql-advanced UTM 파라미터 (1) 유입채널 데이터는 어떻게 볼 수 있을까? 데이터리안 웹사이트 유입채널 알아보기 www.datarian.io utm_source : 유입된 채널 (유튜브) utm_medium : 유입된 매체 (메일) utm_campaign : 유입된 마케팅 캠페인 utm_term : 검색 키워드 / 유료 광고 타겟 utm_content : 유입된 콘텐츠 출처 링크는 보면 sql 캠프에서 유입된 것을 알 수 있음 source, medium, campaign은 필수 term..
목차 1. DML (Data Manipulation Language) 2. ERD (Entity Relationship Diagram) 3. 서브쿼리 4. 윈도우 함수 5. 정규 표현식 6. MySQL 함수 1. DML 1. INSERT INTO table VALUES (value list); INSERT INTO table (column list) VALUES (value list); : 지정하지 않은 컬럼에는 NULL값 2. UPDATE table SET column = value; 컬럼의 전체 레코드 값을 변경할 때 여기서 =는 비교연산자가 아니라 대입연산자 UPDATE table SET column = value WHERE condition; 특정 행의 값만 변경할 때 3. DELETE FROM ..
보호되어 있는 글입니다.

저번에 이어서 남은 RFM 2. 첫 구매 후 한 달 이내 재구매 고객 2-1. 첫 구매 후 2주 이내 재구매 고객 2-3. 2와 2-1의 재구매건 매출액 3. 거래별 고액 고객 구매 # 2. 첫 구매 후 한 달 이내 재구매 고객 select o.customer_id, c.first_order_date, o.order_date from records as o join customer_stats as c on o.customer_id = c.customer_id group by o.customer_id, o.order_date, c.first_order_date having o.order_date > c.first_order_date and o.order_date c.first_order_date and o..