select query and subtopics