hello I have question on nested select in mysql. I want a working query which can achieve the goal what the dummy query below intends to achieve:
select t1.col1 from t1
where t1.col2 in
(select t3.col2, t3.col3 from t3
order by t3.col3 limit NUM)
Well basically speaking, t1.col2 should be in the nest selected t3.col2, but the nested select should order by another column which is t3.col3.
Unfortunatenly,
MySQLdoes not supportLIMITfor queries used withIN.Try this: