SQL | LeetCode 1581. 방문은 했지만 거래는 없던 고객 찾기 (RIGHT JOIN & GROUP BY 예제)
·
Computer Science/SQL
이 포스팅에서는 RIGHT JOIN을 활용해 거래가 일어나지 않은 고객 방문을 찾아보겠습니다. 일반적으로 LEFT JOIN이 더 익숙하겠지만, RIGHT JOIN으로도 같은 문제를 해결할 수 있습니다.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 th..
Excel | Dynamic Array Functions: TOCOL, SEQUENCE, SORT
·
BI & Visualization/Excel
엑셀의 다양한 Dynamic Array 함수 중 실무에서 많이 쓰이는 것들은 밑과 같습니다.SORT: 배열을 정렬SEQUENCE: 숫자 배열 생성TOCOL: 배열을 세로 배열로 변환FILTER: 조건에 맞는 데이터 필터링UNIQUE: 고유한 값 추출XLOOKUP: (동적 결과 가능) 찾기 및 반환 TOCOL가로 배열 또는 여러 행/열 배열을 한 줄짜리 세로 배열로 변환합니다. =TOCOL(array, [ignore], [scan_by_column])array(필수) 세로 배열로 변환할 대상 범위 또는 배열입니다.ignore(선택) 무시할 값의 종류를 지정합니다. (기본값은 0: 무시 안 함)0 - 모든 값을 유지 (기본값)1 - 빈칸(Blank)을 무시2 - 오류(Error)를 무시3 - 빈칸과 오류 모..
SQL | LeetCode 1683. 문자열 길이 함수
·
Computer Science/SQL
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 in a social media app...
Excel | XLOOKUP 함수와 Absolute Cell Reference
·
BI & Visualization/Excel
XLOOKUP 함수란?XLOOKUP은 엑셀에서 새로운 형태의 검색 함수로, 기존의 VLOOKUP, HLOOKUP, INDEX+MATCH를 대체하는 함수입니다.주요 특징은 다음과 같습니다.좌우 구분 없이 검색 가능 (왼쪽/오른쪽 모두 찾기 가능)정확한 일치를 기본으로 함에러 처리를 쉽게 할 수 있음=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])lookup_value(필수)찾을 값. (예: 사람 이름)lookup_array(필수)값을 검색할 범위. (예: Sales Rep 열)return_array(필수)찾은 결과로 반환할 범위. (예: Quota 열)[if_not_found](선택)값..
SQL | LeetCode 584. 조건문으로 필터링하기
·
Computer Science/SQL
Table: Customer+-------------+---------+| Column Name | Type |+-------------+---------+| id | int || name | varchar || referee_id | int |+-------------+---------+In SQL, id is the primary key column for this table.Each row of this table indicates the id of a customer, their name, and the id of the customer who referred them. Find the names of the customer that are not..
SQL | 실습으로 배우는 SQL 문법 - 2
·
Computer Science/SQL
더 다양한 예시를 살펴보겠습니다.가장 높은 급여를 받는 직원 찾기 (MAX와 서브쿼리)우선, 지금 있는 Employee 테이블에 salary 컬럼을 추가하고, 각 직원의 급여도 입력합니다.mysql> ALTER TABLE Employee ADD COLUMN salary INT;Query OK, 0 rows affected (0.12 sec)Records: 0 Duplicates: 0 Warnings: 0mysql> UPDATE Employee SET salary = 70000 WHERE SSN = '101';Query OK, 1 row affected (0.01 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> UPDATE Employee SET salary ..
올리브한입
올리브코드랩