Define 'where' param for queries
Build query string for query endpoints