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
Azure Triggers and SQL Queries
00:00
5 left

Azure Triggers and SQL Queries

HardSQL · PostgreSQL

Problem

Describe how you would build a data pipeline in Azure, including how you would use triggers and write 5 to 6 SQL queries using UNION and window functions.

Use Azure Data Factory terminology and the supplied PostgreSQL tables. Provide six queries that demonstrate ingestion monitoring, event consolidation, ranking, and operational reporting.

Output

  1. Return the final query's latest two events per customer and event type.
  2. Columns: event_type, event_id, customer_id, event_time, metric, event_rank.
  3. Sort by event_type, customer_id, event_time descending, then event_id.

Schema

azure_pipeline_runs
ColumnTypeDescription
run_idPKINTPipeline execution identifier
pipeline_nameVARCHAR(100)Azure Data Factory pipeline name
trigger_typeVARCHAR(40)Trigger that started the pipeline
started_atTIMESTAMPPipeline start timestamp
statusVARCHAR(30)Execution status
regionVARCHAR(30)Processing region
orders
ColumnTypeDescription
order_idPKINTOrder identifier
customer_idVARCHAR(20)Customer identifier
order_tsTIMESTAMPOrder timestamp
amountDECIMAL(12,2)Order amount
statusVARCHAR(30)Order status
regionVARCHAR(30)Order region
cases
ColumnTypeDescription
case_idPKINTCase identifier
customer_idVARCHAR(20)Customer identifier
opened_atTIMESTAMPCase opening timestamp
priorityINTCase priority
statusVARCHAR(30)Case status
regionVARCHAR(30)Case region
Tablesazure_pipeline_runsorderscases
Interviewer

Your question is Azure Triggers and SQL Queries. 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.