از این مقاله کمک گرفتم و کوئری مورد نظرم رو ساختم :
MySQL Get Matching Results From two queries?
طرح سوال :
ما دو تا کوئری با نتایج متفاوت داریم ، ممکنه بعضی نتایج شبیه هم بشه ، من می خوام نتایجی که توی هر دو مشترک هست رو نمایش بده
select productid from smart_data where levelid=7;select productid from smart_data where levelid=11;راه حل :
select powfrom (select productid pow from smart_data where levelid=7) T1INNER JOIN(select productid pow from smart_data where levelid=12) T2USING (pow);