Subquery:-
A subquery is the query which contains inner query and outer query where the inner query is excuted first and send the output to the outer query
Eg:- select * from t1 where t1.c1 in (select t2.c1 from t2)
A coquery is the query which contains inner query and outer query where the inner query is excuted first and send the output to the outer query
Eg:- select * from t1 where t1.c1 > (select t2.c1 from t2 where t1.c3 t2.c3)
T1 Table Name C1 C3 are the column names