"SELECT pictorial_id ,count(*) as count FROM community_pictorial_topic WHERE is_online=1 and (create_time >= '%s' and create_time < '%s') group by pictorial_id "%(
numtime1,numtime2))
data=cursor.fetchall()
cursor.execute(
"SELECT pictorial_id FROM topic_vote_cnt WHERE is_deleted = 0 and (create_time >= '%s' and create_time < '%s') group by pictorial_id"%(
numtime1,numtime2))
data_vote=cursor.fetchall()
pictorial_data=list(data)
pictorial_vote=list(data_vote)
logging.info("Database version : %s "%pictorial_data)
logging.info("Database version : %s "%pictorial_vote)