#1번 select jname as Product from j
#2번 select sname as Name from s where city='Paris'
#3번 select count(distinct pname) as Parts from p
#4번 select sname as Name from s where s_id in (select distinct S_ID from spj where p_id='P3')
#5번 select sname as Name from s where s_id in (select distinct s_id from spj where p_id in (select p_id from p where colour='Red'))
#6번 select pname as Parts from p, spj where p.p_id=spj.p_id group by pname order by sum(quantity) desc
#7번 select sname as Name from s, spj where s.s_id=spj.s_id group by sname order by sum(quantity) desc LIMIT 1
#8번 select sname as Name from s, spj where s.s_id=spj.s_id group by sname order by count(j_id) desc LIMIT 1
#9번 select sname as Name from s where s_id not in (select s_id from spj where p_id='P3')
#10번 select s1.sname, s2.sname from s as s1, s as s2 where s1.city=s2.city and s1.sname<s2.sname
NAVI 써요 - dc App