There are many variants of SQL. DB-API only solves for so much.
```quote
IIUC, to do this with SQL,
> sql(i'select {date:as_date} from {tablename}'
needs to be
['select ', unescaped(date, 'as_date'), 'from ', unescaped(tablename)]
so that e.g. sql_92(), sql_2011()
would know that 'select ' is presumably implicitly escaped
*
https://en.wikipedia.org/wiki/SQL#Interoperability_and_standardization*
http://docs.sqlalchemy.org/en/rel_1_0/dialects/ ```
And from the next message:
```quote
[... Django F-Objects, Q-Objects, deferred evaluation due to schema dialects]
>>> s = select([(users.c.fullname +
... ", " + addresses.c.email_address).
... label('title')]).\
... where(
users.c.id == addresses.c.user_id).\
... where(users.c.name.between('m', 'z')).\
... where(
... or_(
... addresses.c.email_address.like('%@
aol.com'),
... addresses.c.email_address.like('%@
msn.com')
... )
... )
>>> conn.execute(s).fetchall()
SELECT users.fullname || ? || addresses.email_address AS title
FROM users, addresses
WHERE
users.id = addresses.user_id AND
users.name BETWEEN ? AND ? AND
(addresses.email_address LIKE ? OR addresses.email_address LIKE ?)
(', ', 'm', 'z', '%@
aol.com', '%@
msn.com')
[(u'Wendy Williams,
wendy@aol.com',)]
>>> from sqlalchemy.sql import text
>>> s = text(
... "SELECT users.fullname || ', ' || addresses.email_address AS title "
... "FROM users, addresses "
... "WHERE
users.id = addresses.user_id "
... "AND
users.name BETWEEN :x AND :y "
... "AND (addresses.email_address LIKE :e1 "
... "OR addresses.email_address LIKE :e2)")
SQL
>>> conn.execute(s, x='m', y='z', e1='%@
aol.com', e2='%@
msn.com').fetchall()
[(u'Wendy Williams,
wendy@aol.com',)]
```