build where with quoteIdentifier and escape