def get_workflows_without_active_cycles(conn):
  """Get workflows with no active cycles"""

  res = conn.execute("""
    SELECT id
    FROM workflows
    WHERE status='Active'
    AND NOT EXISTS (
    SELECT 1
      FROM cycles
      WHERE cycles.workflow_id = workflows.id)
  """)

  ids = [workflow[0] for workflow in res.fetchall()]
  return ids