Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
Flow vs Workflow Rule
00:00
5 left

Flow vs Workflow Rule

MediumSQL · PostgreSQL

Problem

What's the difference between a Flow and a Workflow Rule?

Use the provided automation metadata, step, and execution records to compare the two automation types. Write a SQL query that summarizes their definitions, activity, steps, and execution outcomes.

Output

  1. One row per automation type, with columns automation_type, definition_count, active_definition_count, avg_steps_per_definition, execution_count, and successful_execution_count.
  2. Include only Flow and Workflow Rule records, ordered with Flow first and Workflow Rule second.

Schema

automations
ColumnTypeDescription
automation_idPKINTUnique automation definition identifier
automation_nameVARCHAR(100)Display name of the automation
automation_typeVARCHAR(30)Automation category, such as Flow or Workflow Rule
trigger_eventVARCHAR(50)Event that starts the automation
is_activeBOOLEANWhether the automation is currently active
automation_steps
ColumnTypeDescription
step_idPKINTUnique automation step identifier
automation_idINTReferenced automation definition
step_typeVARCHAR(40)Type of action or decision step
step_orderINTPosition of the step within the automation
automation_executions
ColumnTypeDescription
execution_idPKINTUnique execution identifier
automation_idINTReferenced automation definition
statusVARCHAR(20)Execution outcome
executed_atTIMESTAMPTimestamp when the automation ran
Tablesautomationsautomation_stepsautomation_executions
Interviewer

Your question is Flow vs Workflow Rule. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.