# foo = Event.objects.raw("select date_format(date, '%Y-%m') as month, sum(quantity) as hours from hourentries group by date_format(date, '%Y-%m') order by date;")
# q = "SELECT * from gracedb_event LIMIT 10"
# q = "SELECT date_format(created, '%%Y-%%m') as month, COUNT(*) AS total FROM gracedb_event GROUP BY date_format(created, '%%Y-%%m') order by created"
# cursor = connection.cursor()
# cursor.execute(q)
# desc = cursor.description
# foo = [ dict(zip([col[0] for col in desc], row))
q="SELECT date_format(created, '%%Y-%%m') as month, COUNT(*) AS total FROM gracedb_event WHERE analysisType = %s GROUP BY date_format(created, '%%Y-%%m')"
q="SELECT date_format(created, '%%Y-%%m') as month, analysisType, COUNT(*) AS total FROM gracedb_event GROUP BY date_format(created, '%%Y-%%m'),analysisType order by created"