Corrected query if no filters are selected