you always can execute sql sql_str = 'SELECT * FROM ...' rows = db.executesql(sql_str)
but your results will not be objects, but an array of arrays or an array of
dicts if you do
sql_str = '''SELECT date, count(foo.items) as total ... '
rows = db.executesql(sql_str, as_dict = True)
for row in rows:
print row['date'], row['total']

