Made a shorter query to find all nodes for a period