Revert "added unique query"

This reverts commit cf64e697ebdd580322df7761bfb2b31a9160737e.