TIL(Today I Learned)

[2024/12/12]내일배움캠프 QA/QC 1기 - 사전캠프 1일차

essay2892 2024. 12. 12. 17:18

품질관리 부트캠프 1회차 수강 등록 완료(최종 합류)

 

엑셀보다 쉽고 빠른 SQL

GPTs로 노코드 AI 챗봇 만들기

데이터 분석 종합반 

세가지 강의 무료 제공 받음

 

[KDC] 엑셀보다 쉽고 빠른 SQL - 1주차 pdf 다운로드 및 DBeaver 설치 및 설정

[스파르타코딩클럽] 직장인을 위한 실전 데이터분석 _ 1주차 pdf 다운로드

 

SQL 1강, 2강 & 데이터 분석 1강 수강 완료(OT)

 

2시 ~ 6시

Gather 접속 및 부트캠프 출석

권민찬 담임매니저님에게 사전캠프 설명 받음

9조 배정 (임시 팀)

팀 노션 초대받음

QAQC 사전캠프 퀘스트 진행 - https://essay2892.tistory.com/1

 

SQL 3강

기본 명령어 Select, From

Select : 데이터 가져오는 기본 명령어

From : 데이터 가져올 테이블

* : 모든 컬럼 가져오기

Query 실행 : Ctrl + Enter

더보기

select *

from food_orders

 

select *

from payments

 

select *

from customers

SQL 4강

특정한 Column만 가져오기

 select Column1, Column2, ...

 from 테이블

 

Column 이름 변경(별명)

1. Column명 as 별명

2. Column명 별명

 * 영문, 언더바의 경우 별명만 적어도 되지만 한글이나 특수문자를 사용하는 경우 큰따옴표(") 내부에 적는다.

 * 띄어쓰기도 특수문자 취급

더보기

select restaurant_name, addr

from food_orders

 

select restaurant_name as "음식점", addr address

from food_orders

 

select order_id as order_no, restaurant_name "식당 이름"

from food_orders

 

select order_id order_no, price "가격", quantity "수량"

from food_orders

 

select name "이름", email "e-mail"

from customers

SQL 5강

원하는 데이터만 불러오기(조건, Where절)

select

from

where 조건

where절에 숫자는 그대로 작성 가능하나 문자는 작은따옴표(') 내부에 작성

더보기

select *

from customers

where age=21

 

select *

from customers

where gender='male'

 

select *

from food_orders

where cuisine_type='Korean'

 

select *

from payments

where pay_type='card'

SQL 6강

Where절에 사용하는 필터링 조건문

=, <>, >, <, >=, <=

between A and B - A와 B 사이의 값

in (A, B, C) - A, B, C만 뽑아냄 (문자의 경우 작은따옴표)

like '시작문자%', like '%포함문자%', like '%끝문자'

더보기

select *

from customers

where age>=21

 

select *

from customers

where gender<>'male'

 

select *

from customers

where age between 21 and 23

 

select *

from customers

where age in (21, 25, 27)

 

select *

from customers

where name in ('윤주아', '정현준')

 

select *

from customers

where name like '김%'

 

select *

from customers

where age >= 40

 

select *

from food_orders

where price < 15000

 

select *

from food_orders

where price between 20000 and 30000

 

select *

from food_orders

where restaurant_name like 'B%'