[SQL] #1 select | from | where |
1673 ワード
1)データナビゲーション
1)すべての列を抽出
select *
from public.gmv_trend

2)特定の列の抽出
select category, yyyy, gmv
from gmv_trend

3)重複しない特定の列の抽出
select distinct category
from gmv_trend

2)特定年度の収益について理解する
2-1)一つの条件のみの場合More Example
a)数字列(間、サイズ比較)
select *
from gmv_trend
where yyyy = 2021

select *
from gmv_trend
where yyyy between 2017 and 2020

b)文字列(=,!=,like,in,not in)
select *
from gmv_trend gt
where category = '컴퓨터 및 주변기기'

select *
from gmv_trend gt
where category like '%패션%'
--ファッションデータの追加
2-2)複数条件の場合
a)と条件
select *
from gmv_trend
where category in ('가전·전자·통신기기','서적')
and yyyy = 2019

Reference
この問題について([SQL] #1 select | from | where |), 我々は、より多くの情報をここで見つけました https://velog.io/@kakasi18/SQL-select-from-whereテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol