Updated get leads query