Implemented nested queries and LET statement