def print_sql(show_queries=True):
    print "Total Run Time: %s"%(datetime.now()-start_time)
    print "Total Postgres Time: %s"%sum([float(query['time']) for query in con.queries[query_count:]])
    print "Queries: %s"%(query_count-len(con.queries))

    if show_queries:
        for query in con.queries[query_count:]:
            print "\nPostgres Time: %s"%query['time']
            print sqlparse.format(query['sql'], reindent=True, keyword_case='upper')
dataset/ETHPy150Open jfalkner/Efficient-Django-QuerySet-Use/demo-optimized/django_pg_utils/__init__.py/print_sql/swapped operands of `-`