Pandas read_sql query with multiple selects
You could do the following:
queries = """SELECT ColumnX_1, ColumnX_2, ColumnX_3FROM Table_XINNER JOIN (Etc etc...)---SELECT ColumnY_1, ColumnY_2, ColumnY_3FROM Table_YINNER JOIN (Etc etc...)""".split("---")
Now you can query each table and concat the result:
df = pd.concat([pd.read_sql_query(q, connection) for q in queries])
Another option is to use UNION on the two results i.e. do the concat in SQL.