document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. conn = sqlite3.connect(dbfilename,
  2.         detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
  3.  
  4.     sql = "SELECT symbol, date as \'date [datetime]\', open, high, low, " \\
  5.           "close, volume, adjclose from stocks where symbol=\'%s\' and " \\
  6.           "date>=%s and  date<=%s" % (symbol, startdate, enddate)
  7.  
  8.     qry = conn.execute(sql)
');