others=frappe.db.sql('''select tabProcedure.active_status,count(distinct(`tabProcedure_Details`.procedure_name)) as syscount,tabProcedure.workflow_state
others=frappe.db.sql('''select `tabProcedure`.active_status,count(distinct(`tabProcedure_Details`.procedure_name)) as syscount,`tabProcedure`.workflow_state
'''select count(distinct(step_name)) as count, modified as {1} from {0}.tabProcedure_Details where parent= '{2}' group by(procedure_name) order by idx;'''.format(current_db_name,colmodified,procedure),as_list=True)
'''select count(distinct(step_name)) as count, modified as {1} from {0}.`tabProcedure_Details` where parent= '{2}' group by(procedure_name) order by idx;'''.format(current_db_name,colmodified,procedure),as_list=True)