Corrected query