Sql Query To Check Workflow Automation