Check out example codes for "NESTED QUERY SQL". It will help you in understanding the concepts better.

Code Example 1

SELECT column_name [, column_name ]
FROM   table1 [, table2 ]
WHERE  column_name OPERATOR
   (SELECT column_name [, column_name ]
   FROM table1 [, table2 ]
   [WHERE])

Learn ReactJs, React Native from akashmittal.com