List:General Discussion« Previous MessageNext Message »
From:Norman Khine Date:June 23 2011 2:05pm
Subject:sql query advise
View as plain text  
hello,
i have this SQL code in a python programme but i wanted to change the
SQL so that it returns totals for each date. or do i have to make a
loop for each date range so that i get the following results which
then i would like to plot on a graph.

$ python daily_totals.py
(2L, Decimal('173.958344'), Decimal('159.966349')) 2011-06-23
(6L, Decimal('623.858200'), Decimal('581.882214')) 2011-06-22
...

here is the code: http://pastie.org/2111226

thanks

norman

-- 
˙ʇı ɹoɟ ƃuıʎɐd ǝɹ,noʎ ʍou puɐ ǝɔıoɥɔ ɐ ʞooʇ ı ʇɐɥʇ sı 'ʇlnɔıɟɟıp sı ʇɐɥʍ
˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝc,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
Thread
sql query adviseNorman Khine23 Jun
  • Re: sql query adviseJohan De Meersman24 Jun