Skip to content

Instantly share code, notes, and snippets.

@jasonrahm
Created December 30, 2016 14:00
Show Gist options
  • Save jasonrahm/bb51241fcbef0c3d319648e933874f46 to your computer and use it in GitHub Desktop.
Save jasonrahm/bb51241fcbef0c3d319648e933874f46 to your computer and use it in GitHub Desktop.
working sql query, how to make this with sqlalchemy?
sql_text = '''SELECT *
FROM
CompetitionTeams ct
INNER JOIN
Teams t ON ct.teams = t.id
WHERE
ct.competitions = {}'''.format(comp)
result = db.engine.execute(sql_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment