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 | 31 |
Tags
- 질문
- 번역
- 인공지능
- neural networks
- 꿈
- SQL
- 신경망
- 사랑
- 한국어
- TensorFlow Tutorials
- openai
- Tutorial
- 매크로
- 세상
- tutorials
- cs231n
- Reinforcement Learning
- 행복
- DeepLearning
- 강화학습
- Andrej Karpathy
- Hvass-Lab
- machine learning
- Artificil Intelligence
- 머신러닝
- deep learning
- 답변
- 딥러닝
- tensorflow
- SAS
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