Issue #24395:tweak query
Merge pull request #499 from garyhgohoos/24395

Issue #24395:tweak query