#res=db.query("select count(cycle_id) as count, c.name from clinic_hd_case as hd inner join clinic_cycle as c on c.id=hd.cycle_id where hd.company_id =%s and hd.date >= %s and hd.date <= %s group by c.name",company_id,time_start,time_stop)
res=db.query("select count(cycle_id) as count, c.name from clinic_hd_case as hd inner join clinic_cycle as c on c.id=hd.cycle_id where hd.company_id =%s group by c.name",company_id)