PlayData/MySQL

[Day14 | MySQL] Join(ANSI Join, inner join, outer join, cross join etc.)

๊น€์œ ๋‹ˆ์ฝ˜ 2021. 11. 26. 17:55

JOIN ๋ฌธ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ• 

 

 

๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ ์†์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์‹ค์Šต์ด ํ•„์š”ํ•ด์š”! 

์–ธ์–ด๋กœ ์ดํ•ดํ•˜๊ณ  --> ๊ทธ๋‹ค์Œ์— ์งœ๊ธฐ.

์šฐ์„  ์ƒ๊ฐ์—†์ด select from ์“ฐ๊ณ , ๊ทธ ํ›„ ์—ฐ๊ฒฐ ๋ฐ์ดํ„ฐ ์ฐพ์•„ ์จ์ฃผ๊ณ  ์ด๋Ÿฐ ์‹์œผ๋กœ!

 

๋‚˜์ค‘์— ๋ฐ์ดํ„ฐ ๋ฒ ์ด์Šค ์„ค๊ณ„ํ•  ๋•Œ ์ •์ž‘ ๋Šฅ๋ ฅ์€ ๊ณ ๊ฐ์˜ ์š”๊ตฌ๋ฅผ ํ•œ๊ธ€๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค! ์ด๊ฒŒ ์ œ์ผ ์ค‘์š”ํ•ด์šค!! 

 

 

 

Q. KING ์ด๋ฆ„, ๋ถ€์„œ๋ช…, ๋ถ€ํ•˜์ง์› ์ด๋ฆ„, ๋ถ€์„œ๋ช…? 

์ด๋ ‡๊ฒŒ ๊ตฌ์กฐ์žก๊ธฐ

 

 

Q. 4 ๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ํ•ด๋‹นํ•˜๋Š” ์ง์›๋“ค์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๊ธ‰์—ฌ๋“ฑ๊ธ‰๊ณผ ๊ทธ ์ง์›๋“ค์˜ ๋ถ€ํ•˜์ง์›์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?

- m์€ ๋งค๋‹ˆ์ €

- e๋Š” ๋ถ€ํ•˜์ง์› 

์ด๋Ÿฐ ๊ตฌ์กฐ๋กœ ์ƒ๊ฐํ•ด์„œ ํ’€์–ด๊ฐ€๊ธฐ 

 

 

 

Join01.SQL

-- Join01.sql --

-- SMITH์˜ ์ด๋ฆ„, ์†Œ์† ๋ถ€์„œ ์ด๋ฆ„์€? 

SELECT ename, dname
FROM emp, dept 
WHERE (emp.deptno = dept.deptno) 
AND (ename = 'SMITH');


-- research ๋ถ€์„œ ์†Œ์† ์ง์›๋“ค์˜ ๋ถ€์„œ๋ช…, ์œ„์น˜, ์ง์›์ด๋ฆ„, ์‚ฌ๋ฒˆ์€? 

select  dname, loc, ename, empno
from emp, dept 
where (emp.deptno = dept.deptno)
and (dname = 'research');



-- sales ๋ถ€์„œ์˜ ์ง์›๋“ค์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ์ด๋ฆ„์€?
SELECT ename, empno, dname
from emp, dept 
where (emp.deptno = dept.deptno)
and (dname = 'sales');



-- King์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, job, ๋ถ€์„œ๋ช…, ์œ„์น˜๋Š” ?

select ename, empno, job, dname, loc 
from emp, dept 
where (emp.deptno = dept.deptno)
and ename = 'king';


-- smith์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๋ถ€์„œ๋ฒˆํ˜ธ๋Š” ? deptno ์–ด๋–ค ๊ฒƒ์„ ์จ์•ผํ•˜๋Š”์ง€ ์ •ํ•ด์ค˜์•ผ 
SELECT emp.ename, emp.empno, dept.dname, emp.deptno
from  emp , dept 
where (emp.deptno = dept.deptno)
AND emp.ename = 'SMITH';


-- smith์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๋ถ€์„œ๋ฒˆํ˜ธ๋Š” ? ๋ณ„์นญ ์ฃผ๊ธฐ  
SELECT e.ename, e.empno, d.dname, e.deptno
from  emp e, dept d 
where (e.deptno = d.deptno)
AND e.ename = 'SMITH';


-- ๋ถ€์„œ ์ด๋ฆ„๋ณ„ ์ธ์›์ˆ˜? --'๋ณ„' ๋ถ™์œผ๋ฉด ์ •๋ ฌ ์•„๋‹ˆ๋ฉด ์†ŒํŒ… 
SELECT d.dname, count(e.empno)
from emp e, dept d 
where ( d.deptno  = e.deptno ) -- ๋„˜๋‚˜๋“œ๋Š” ๋‹ค๋ฆฌ ๊ทธ๋Œ€๋กœ ์จ์ฃผ๋ฉด ๋จ , ๋‚˜์ค‘์— ์กฐ์ธ๋ฌธ์€ ๋…ธ๊ฐ€๋‹ค 
group by d.dname; -- ๊ทธ๋ฃจํ•‘ํ•˜๋ฉด ๋ฌด์—‡์œผ๋กœ ๊ทธ๋ฃจํ•‘ํ–ˆ์ง€ select ๋’ค์— ์จ์ค€๋‹ค.


-- ๋ถ€์„œ ์ด๋ฆ„๋ณ„ ํ‰๊ท  ๊ธ‰์—ฌ? 
SELECT d.dname, AVG(sal) 
from emp e, dept d 
where ( d.deptno  = e.deptno ) -- ๋„˜๋‚˜๋“œ๋Š” ๋‹ค๋ฆฌ ๊ทธ๋Œ€๋กœ ์จ์ฃผ๋ฉด ๋จ , ๋‚˜์ค‘์— ์กฐ์ธ๋ฌธ์€ ๋…ธ๊ฐ€๋‹ค 
group by d.dname;

-- ๋ถ€์„œ๋ณ„ ํ‰๊ท  ๊ธ‰์—ฌ๊ฐ€ 2000์ด ๋„˜๋Š” ๋ถ€์„œ์™€ ํ‰๊ท  ๊ธ‰์—ฌ? 
SELECT d.dname, avg(e.sal)
from emp e, dept d 
where ( d.deptno  = e.deptno )
group by d.dname
having (avg(e.sal)>=2000) ;



-- ์Šค๋ฏธ์Šค์”จ์˜ ์ด๋ฆ„, ๊ธ‰์—ฌ, ๊ธ‰ range๋Š” ์–ด๋””์— ์žˆ์„๊นŒ? 

SELECT e.ename , e.sal, s.grade 
from emp e, salgrade s
where (e.sal between s.losal AND s.hisal)
and (e.ename = 'SMITH') ;


-- 3 ๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ๊ธ‰์—ฌ๋“ฑ๊ธ‰, ํ•ด๋‹น ์ง์›์˜ ์ด๋ฆ„, ๊ธ‰์—ฌ๋Š”?
SELECT s.grade , e.ename , e.sal 
from emp e, salgrade s 
where (s.grade = 3);



-- 1,4 ๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ๊ธ‰์—ฌ๋“ฑ๊ธ‰, ํ•ด๋‹น ์ง์›์˜ ์ด๋ฆ„, ๊ธ‰์—ฌ๋Š”?
SELECT s.grade, e.ename, e.sal
from emp e, salgrade s 
where (s.grade = 1 or s.grade = 4)
order by s.grade ;

-- ๊ธ‰์—ฌ๋“ฑ๊ธ‰๋ณ„ ์ธ์›์ˆ˜๋Š”?
select s.grade, count(empno)
from emp e, salgrade s 
where (e.sal BETWEEN s.losal and s.hisal)
group by s.grade;


-- sales ๋ถ€์„œ์˜ ๋ถ€์„œ๋ช…, ์†Œ์†์ง์›์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๊ธ‰์—ฌ, ๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?
select d.dname, e.ename, e.empno, e.sal, s.grade 
from emp e, dept d , salgrade s 
where (e.sal BETWEEN s.losal and s.hisal)
and d.dname = 'sales';


-- research ๋ถ€์„œ ์†Œ์† ์ง์›๋“ค์˜ ๋ถ€์„œ๋ช…, ๋ถ€์„œ๋ฒˆํ˜ธ, ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๊ธ‰์—ฌ, ๊ธ‰์—ฌ ๋“ฑ๊ธ‰์€? 
SELECT d.dname , d.deptno , e.ename, e.empno , e.sal , s.grade 
from emp e , dept d , salgrade s 
WHERE (e.sal BETWEEN s.losal and s.hisal)
and d.dname = 'research';


-- KING์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๊ธ‰์—ฌ, ๊ธ‰์—ฌ๋“ฑ๊ธ‰, ๋ถ€์„œ๋ช…์€? 
SELECT e.ename ,e.empno ,e.sal , s.grade ,d.dname 
from emp e , dept d , salgrade s 
where e.deptno = d.deptno 
and (e.sal BETWEEN s.losal and s.hisal )
and (e.ename = 'king');






-- smith์˜ ์ด๋ฆ„๊ณผ ์ง์†์ƒ๊ด€์˜ ์ด๋ฆ„์€? 
SELECT a1.ename , a2.ename as 'manager'
from emp a1, emp a2
where a1.ename = 'smith'
and  a2.empno = a1.mgr ;


-- ford์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€ํ•˜์ง์›์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ์€?
SELECT a1.ename , a1.empno , a2.ename as '๋ถ€ํ•˜์ง์›', a2.empno 
from emp a1, emp a2
WHERE a1.ename = 'ford'
and a1.empno = a2.mgr ;


-- King ์˜ ์ด๋ฆ„, ๋ถ€์„œ๋ช…, ๋ถ€ํ•˜์ง์›์˜ ์ด๋ฆ„, ๋ถ€์„œ๋ช…์€? 
-- ํ…Œ์ด๋ธ” 4๊ฐœ์ด๋ฏ€๋กœ ์ตœ์†Œ join์กฐ๊ฑด 3๊ฐœ. 
SELECT e1.ename , d1.dname , e2.ename , d2.dname 
from emp e1, dept d1, emp e2, dept d2
where e1.deptno = d1.deptno 
and e2.deptno = d2.deptno 
and e1.empno = e2.mgr
and e1.ename = 'king';


-- ์™œ dept ์–ด์ฐจํ”ผ ๊ฐ™์€ ๋…ผ๋ฆฌ๋กœ ์—ฐ๊ฒฐํ•˜๋Š”๋ฐ ํ…Œ์ด๋ธ” ๊ผญ ๋‚˜๋ˆ ์„œ ์จ์•ผํ•˜๋‚˜์š”? 
-- ์•ˆ๋‚˜๋ˆ ์“ฐ๋ฉด ์„ธ ํ…Œ์ด๋ธ”์— ๋™์‹œ ๋งŒ์กฑํ•˜๋Š” ๊ฒฝ์šฐ๋งŒ ๋‚˜์˜ค๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค 

select me.ename,dd.dname , ee.ename, dd.dname 
from emp me, dept dd, emp ee
where ( me.deptno = dd.deptno )
 and  ( me.empno = ee.mgr )
 and  ( ee.deptno = dd.deptno )
 and  (me.ename = 'King');




-- 4 ๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ํ•ด๋‹นํ•˜๋Š” ์ง์›๋“ค์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๊ธ‰์—ฌ๋“ฑ๊ธ‰๊ณผ
--    ๊ทธ ์ง์›๋“ค์˜ ๋ถ€ํ•˜์ง์›์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€์„œ๋ช…, ๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?

SELECT e1.ename , e1.empno , d1.dname , s1.grade , 
	   e2.ename , e2.empno ,d2.dname , s2.grade 
from emp e1, salgrade s1, dept d1,
	 emp e2, salgrade s2, dept d2
where e1.deptno = d1.deptno 
and e2.deptno = d2.deptno 
and e1.empno = e2.mgr
and e1.sal BETWEEN s1.losal and s1.hisal 
and e2.sal BETWEEN s2.losal and s2.hisal 
and s1.grade = 4;

-- --------------------------------------------


drop table dept2; -- ํ…Œ์ด๋ธ” ์‚ญ์ œ 

-- dept์— ์žˆ๋Š” ๋ชจ๋“  ์ปฌ๋Ÿผ์„ dept2์— ๋ณต์‚ฌํ•ด๋ผ 
create table dept2  
select * from dept;

drop table emp2;

-- k๊ฐ€ ๋“ค์–ด์žˆ๊ฑฐ๋‚˜ s๋กœ ๋๋‚˜๋Š” ์• ๋“ค๋งŒ ๋ณต์‚ฌํ•ด๋ผ 
create table emp2
select ename,empno,deptno 
from emp 
where ename like '%K%' or ename like '%S';

select * from emp2;
select * from dept2;


-- ๋ฐ์ดํ„ฐ ์ž…๋ ฅ
INSERT into emp2 values('Tom', 7777, null);


-- emp2, dept2 
-- ์ „ ์ง์›์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ์œ„์น˜, ๋ถ€์„œ๋ฒˆํ˜ธ? 

SELECT * 
from emp2 e ,dept2 d 
where e.deptno = d.deptno ;


-- tom? operation ๋ถ€์„œ? ์—ฐ๊ฒฐ๊ณ ๋ฆฌ๊ฐ€ ์—†์–ด์„œ ์•ˆ๋‚˜์˜ด 
-- ANSI JOIN 273p
select *
from emp2 e inner join dept2 d on(e.deptno = d.deptno);

SELECT *
from emp2 e left outer join dept2 d on (e.deptno = d.deptno);

SELECT *
from emp2 e right outer join dept2 d on (e.deptno = d.deptno);

-- mysql์—์„œ๋Š” full outer join ์ด ์•ˆ๋จ. 
SELECT *
from emp2 e full outer join dept2 d on (e.deptno = d.deptno);


-- ๋”ฐ๋ผ์„œ ๋”ฐ๋กœ ๋”ฐ๋กœ ๊ตฌํ•œ๊ฑธ ํ•ฉ์ณ์•ผ

SELECT *
from emp2 e left outer join dept2 d on (e.deptno = d.deptno)
union
SELECT *
from emp2 e right outer join dept2 d on (e.deptno = d.deptno);

join ์˜ ํ˜•ํƒœ๋Š” ๋‘ ๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. 

1. ์ผ๋ฐ˜ join : where ์กฐ๊ฑด  // ๊ฐœ๋ฐœ์ž๋“ค์€ ์ด๊ฑธ ์„ ํ˜ธํ•˜๊ณ 

2. ANSI join : from ํ…Œ์ด๋ธ” (    )  join ํ…Œ์ด๋ธ”  on ( join ์กฐ๊ฑด ) // ์š”์ฆ˜ ํ”„๋กœ๊ทธ๋žจ๋“ฑ ์‹œํ—˜์€ ์ด๊ฑธ๋กœ ์“ด๋‹ค

 

๊ณ ๋กœ ๋‘˜ ๋‹ค ์•Œ์•„์•ผ! 

 

Join02.sql

-- JOIN02 -- 


-- tom? operation ๋ถ€์„œ? ์—ฐ๊ฒฐ๊ณ ๋ฆฌ๊ฐ€ ์—†์–ด์„œ ์•ˆ๋‚˜์˜ด 
-- ANSI JOIN 273p
select *
from emp2 e inner join dept2 d on(e.deptno = d.deptno);

SELECT *
from emp2 e left outer join dept2 d on (e.deptno = d.deptno);

SELECT *
from emp2 e right outer join dept2 d on (e.deptno = d.deptno);

-- mysql์—์„œ๋Š” full outer join ์ด ์•ˆ๋จ. 
SELECT *
from emp2 e full outer join dept2 d on (e.deptno = d.deptno);


-- ๋”ฐ๋ผ์„œ ๋”ฐ๋กœ ๋”ฐ๋กœ ๊ตฌํ•œ๊ฑธ ํ•ฉ์ณ์•ผ

SELECT *
from emp2 e left outer join dept2 d on (e.deptno = d.deptno)
union
SELECT *
from emp2 e right outer join dept2 d on (e.deptno = d.deptno);

-----------------------------------

-- SMITH์˜ ์ด๋ฆ„, ์†Œ์† ๋ถ€์„œ ์ด๋ฆ„์€? 

SELECT ename, dname
FROM emp, dept 
WHERE (emp.deptno = dept.deptno) 
AND (ename = 'SMITH');





SELECT e.ename , d.dname 
from emp e inner join dept d 
	on (e.deptno = d.deptno)
WHERE (e.ename = 'smith');

----------------------------------------------------

-- RESEARCH ๋ถ€์„œ ์†Œ์† ์ง์›๋“ค์˜ ๋ถ€์„œ๋ช…, ์œ„์น˜, ์ด๋ฆ„, ์‚ฌ๋ฒˆ์€? 
SELECT d.dname , d.loc , e.ename , e.empno 
from emp e inner join dept d 
	on (e.deptno  = d.deptno)
where (d.dname= 'research');


-- ๋ถ€์„œ๋ช…๋ณ„ ํ‰๊ท  ๊ธ‰์—ฌ๋Š”? 
SELECT d.dname , AVG(e.sal)
from dept d inner join emp e
	on (e.deptno = d.deptno)
group by d.dname ;


-- smith์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๊ธ‰์—ฌ, ๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?
SELECT e.ename , e.empno , e.sal , s.grade 
from emp e inner join dept d on (e.deptno = d.deptno)
 		   inner join salgrade s on (e.sal BETWEEN s.losal and s.hisal)
where e.ename  = 'smith';



-- 3๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ๋“ฑ๊ธ‰, ์ง์›์ด๋ฆ„, ๊ธ‰์—ฌ๋Š”?
SELECT s.grade , e.ename , e.sal 
FROM emp e	
	inner join salgrade s 
		on(e.sal BETWEEN s.losal and s.hisal)
where s.grade = 3;


-- ๊ธ‰์—ฌ๋“ฑ๊ธ‰๋ณ„ ์ง์›์ˆ˜๋Š”?

select s.grade , count(e.empno)
from emp e inner join salgrade s 
		on (e.sal BETWEEN s.losal and s.hisal)
group by s.grade ;

-- King์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๋ถ€ํ•˜์ง์›๋“ค์˜ ์ด๋ฆ„, ์‚ฌ๋ฒˆ์€?

SELECT me.ename , me.empno , ee.ename , ee.empno 
from emp me inner join emp ee 
	on (me.empno  = ee.mgr)
where (me.ename = 'king')




3 ๊ธ‰์—ฌ๋“ฑ๊ธ‰์˜ ๊ธ‰์—ฌ๋“ฑ๊ธ‰, ํ•ด๋‹น ์ง์›์˜ ์ด๋ฆ„, ๊ธ‰์—ฌ, ๋ถ€์„œ๋ช…์€ ?

select s.grade , e.ename , e.sal, d.dname
from salgrade s inner join emp e on(e.sal between s.losal and s.hisal)
				inner join dept d on(d.deptno = e.deptno)
where (s.grade = 3);

---------------------------------


sales ๋ถ€์„œ์˜ ๋ถ€์„œ๋ช…, ์†Œ์†์ง์›์ด๋ฆ„, ์‚ฌ๋ฒˆ, ๊ธ‰์—ฌ, ๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?;

SELECT d.dname , e.ename ,e.empno ,e.sal ,s.grade 
from emp e inner join salgrade s on (e.sal BETWEEN s.losal and s.hisal)
		   inner join dept d ON (e.deptno = d.deptno)
where d.dname = 'sales';


King ์˜ ์ด๋ฆ„, ๋ถ€์„œ๋ช…, ๋ถ€ํ•˜์ง์›์˜ ์ด๋ฆ„, ๋ถ€์„œ๋ช…์€?;

-- ๋‚ด ํ’€

SELECT e1.ename , d1.dname , e2.ename , d2.dname 
from emp e1 inner join dept d1 on (e1.deptno = d1.deptno)
			inner join emp e2 on (e1.empno = e2.mgr)
			inner join dept d2 on (e2.empno = d2.deptno)
where e1.ename = 'king';


-- ํ•ด์„ค 
select me.ename, md.dname, ee.ename, ed.dname 
from emp me inner join dept md on (me.deptno = md.deptno)
			inner join emp ee on (me.empno = ee.mgr)
			inner join dept ed on (ee.deptno = ed.deptno)
where (me.ename = 'king');

King ์˜ ์ด๋ฆ„๊ณผ ๋ถ€ํ•˜์ง์›๋“ค์˜ ์ด๋ฆ„,job,๋ถ€์„œ๋ช…,๊ธ‰์—ฌ,๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?;
SELECT e1.ename , e2.ename , e2.job , d2.dname , e2.sal , s2.grade 
from emp e1 inner join emp e2 on (e1.empno = e2.mgr)
			inner join dept d2 on (e2.deptno = d2.deptno )
			inner join salgrade s2 on (e2.sal BETWEEN s2.losal and s2.hisal) 
where e1.ename = 'king';

-- ํ•ด์„ค
King ์˜ ์ด๋ฆ„๊ณผ ๋ถ€ํ•˜์ง์›๋“ค์˜ ์ด๋ฆ„,job,๋ถ€์„œ๋ช…,๊ธ‰์—ฌ,๊ธ‰์—ฌ๋“ฑ๊ธ‰์€?;

select me.ename, ee.ename, ee.job, ed.dname, ee.sal , es.grade
from emp me inner join emp ee on (me.empno = ee.mgr)
			inner join dept ed on (ee.deptno = ed.deptno)
			inner join salgrade es on (ee.sal between es.losal and es.hisal)
where (me.ename = 'king');


-- emp2 , dept2

-- outerjoin 

๋ชจ๋“  ๋ถ€์„œ์˜ ์ง์› ์ˆ˜๋Š”? 

SELECT d.dname, COUNT(e.empno)
from dept2 d left outer join emp2 e 
	on (d.deptno = e.deptno)
group by d.dname ;

SELECT d.dname, count(e.empno)
from emp2 e right outer join dept2 d 
	on(d.deptno = e.empno)
group by d.dname ;



-- cross join --(๋ชจ๋“  ๊ฒฝ์šฐ์˜ ์ˆ˜) 288~289p
select * 
from emp2 e, dept2 d;

SELECT *
from emp2 e cross join dept2 d;



-- selfjoin p290

 

 

๋‹ค์Œ์ฃผ๋ถ€ํ„ฐ ๊ณผ์ œ๋ฅผ ๋‚ด์ค„์ง€๋„ ๋ชฐ๋ผ์š” 

๋ ฬŠฬˆ์šฉฬŠฬˆ

๐Ÿคฆ๐Ÿป‍โ™€๏ธ