The dataSource property for layers does not return the name of the tables used in query layers. Instead, it returns something like the following:
Whereas the tables in SDE that the query layer is referencing may be called something like
sde.SDE.FEATURECLASS (and this is what dataSource would return if the layer were a non-query layer layer).
Since you can't use the dataSource property to return the tables used to make a query layer, how do you return the table names?
Using ArcGIS/ArcPy 10.3 and ArcSDE 10.1