Fixed query for levels