fixed db query
Revert "fixed db query"

This reverts commit 3f8260f5a55726f8646698e1a1df37a23953e735.
fixed db query