Hi Bing,
To work on a version with SQLExecute you'll first need to set the versioned view via a stored procedure in your DBMS, otherwise it will only see the base table.
The following topics explain how to access geodatabase data with SQL and versioned views (previously called multiversioned views)
SQL access to enterprise geodatabase data—ArcMap | Documentation