Convert to query syntax for selecting.