Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- Andrej Karpathy
- 사랑
- deep learning
- 번역
- 답변
- Tutorial
- TensorFlow Tutorials
- 머신러닝
- Artificil Intelligence
- Reinforcement Learning
- tensorflow
- 꿈
- 행복
- 매크로
- tutorials
- 세상
- openai
- 질문
- machine learning
- 인공지능
- Hvass-Lab
- 신경망
- cs231n
- 한국어
- 강화학습
- 딥러닝
- SAS
- DeepLearning
- neural networks
- SQL
Archives
- Today
- Total
Economics & Deeplearning
PROC SQL Tutorial 7 - outer join 1 본문
outer join 에는 세가지가 있음
left, right, full
문법은 select ~ from ~ left join|right join|full join ~ on 으로 해결함
left outer join
proc sql;
select *
from one
left join
two
on one.x = two.x;
right outer join
proc sql;
select *
from one
right join
two
on one.x=two.x;
full outer join
proc sql;
select *
from one
full join
two
on one.x=two.x;
data merged;
merge three four;
by x;
run;
proc sql;
select three.x, a, b
from three
full join
four
on three.x = four.x
order by x;
coalesce 명령문을 같이 쓰면 해결
proc sql;
select coalesce(three.x, four.x) as X, a , b
from three
full join
four
on three.x = four.x;
sql join은 정렬이 필요없고, 변수명이 같지 않아도 되고, where 절에서 = 뿐만 아니라 다른 연산 > 등도 쓸 수 있다.
'SAS > PROC SQL' 카테고리의 다른 글
PROC SQL Tutorial 9 - outer join 3 : intersect (1) | 2016.01.26 |
---|---|
PROC SQL Tutorial 8 - outer join 2 (0) | 2016.01.26 |
PROC SQL Tutorial 6 - inner join (0) | 2016.01.26 |
PROC SQL Tutorial 5 - join(cartesian product) (0) | 2016.01.26 |
PROC SQL Tutorial 4 - subquery (0) | 2016.01.26 |
Comments