Adding condition clause, sub queries and more.