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
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess 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
Get started
Power BI Dashboard Performance
00:00
5 left

Power BI Dashboard Performance

MediumSQL · PostgreSQL

Problem

What is your experience with Microsoft Power BI, and how do you optimize dashboard performance for large datasets?

For the SQL portion, prepare a dashboard-ready monthly summary from the provided tables, including branches with no qualifying transactions.

Output

  1. One row per branch, month, and product category, plus one null summary row for branches without qualifying transactions
  2. Columns: branch_id, branch_name, month, category, transaction_count, total_amount, average_amount
  3. Include completed transactions from January 1 through March 31, 2025, order by branch_id, month ascending with null months last, then category

Schema

branches
ColumnTypeDescription
branch_idPKINTUnique branch identifier
branch_nameVARCHAR(100)Branch display name
cityVARCHAR(80)City where the branch operates
products
ColumnTypeDescription
product_idPKINTUnique product identifier
product_nameVARCHAR(100)Product display name
categoryVARCHAR(60)Product category used in reporting
transactions
ColumnTypeDescription
transaction_idPKINTUnique transaction identifier
branch_idINTBranch associated with the transaction
product_idINTProduct associated with the transaction
transaction_dateDATEDate the transaction was recorded
amountDECIMAL(12,2)Transaction amount
statusVARCHAR(20)Transaction processing status
Tablestransactionsbranchesproducts
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the three tables are in the Question tab.

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.