Python Use Variable In Sql Query Examples With Multiple Tables