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 ..
SQL | 실습으로 배우는 SQL 문법 - 1
·
Computer Science/SQL
이번 글에서는 mycompany라는 가상의 회사 데이터베이스를 구성하며, 실제 업무에서 자주 등장하는 테이블 관계와 함께 SQL 문법을 학습합니다.데이터베이스와 테이블 생성mysql> CREATE DATABASE mycompany;Query OK, 1 row affected (0.01 sec)mysql> USE mycompany;Database changedmysql> CREATE TABLE Department ( -> dept_id CHAR(3) PRIMARY KEY, -> dept_name VARCHAR(20), -> dept_location VARCHAR(20) -> );Query OK, 0 rows affected (0.02 sec)mysql> CREATE TABLE Pr..
SQL | Selection, JOIN, View 실습 (vetdb 예제) - 2
·
Computer Science/SQL
이전 글에서는 vetdb 데이터베이스를 설계하고 Owner, Pet 테이블을 생성하는 과정을 다뤘습니다. 이번 글에서는 그 다음 단계로, 데이터를 조회하고 결합하고 가공하는 데 유용한 SQL 문법을 실습 중심으로 익혀보겠습니다.데이터 선택 (Selection)mysql> SELECT * FROM owner;+----------+-------------+---------------+-------------------------+| owner_id | name | phone | email |+----------+-------------+---------------+-------------------------+| 1 | Kim Sooji..
올리브한입
'분류 전체보기' 카테고리의 글 목록 (6 Page)