Sub query is the query that is written within another query and its output serves as input to outer query .
like 2 tabal ----emp_mst and emp_d_mast
emp_mst ----emp_id p.key and emp_name
emp_d_mst -----emp_id f.key and emp_salary
then
select emp_salary from emp_d_mst where emp_id = (select emp_id from emp_mst where emp_name = "jay pathak")