Revert "Changed the query"

This reverts commit f6e19c09f431b3d8f79fc4b42dfd88c421b079f0.
Revert "Revert "Changed the query""

This reverts commit b6db6b8cb8044b35cbebd7d7ac87b641b872f197.