Added Advanced query for further development