"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 )"%(
"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 )"%(
"SELECT pictorial_id FROM topic_vote_cnt WHERE is_deleted = 0 and (create_time >= '%s' and create_time < '%s') group by pictorial_id"%(