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
Monthly Active Asset Growth Rate
00:00
5 left

Monthly Active Asset Growth Rate

MediumSQL · PostgreSQL

Problem

You are given deployment records for hardware assets and a reference table of assets. Write a PostgreSQL query to calculate the month-over-month growth rate of active hardware assets deployed in the field. Treat an asset as active in a month if it was deployed on or before the end of that month and has not been retired before that month ends. Only include assets whose current status is active and whose deployment location is field.

Return one row per month with the month, the count of active deployed assets, the previous month's count, and the month-over-month growth rate as a percentage. For the first month in the result, the previous month count and growth rate should be NULL.

Schema

hardware_assets
ColumnTypeDescription
asset_idPKINTUnique hardware asset identifier
asset_nameVARCHAR(100)Human-readable asset name
asset_typeVARCHAR(50)Type of hardware asset
statusVARCHAR(20)Current asset status such as active, retired, or maintenance
asset_deployments
ColumnTypeDescription
deployment_idPKINTUnique deployment record identifier
asset_idINTReferences hardware_assets.asset_id
deployed_atDATEDate the asset was deployed
retired_atDATEDate the deployment ended, if retired
location_typeVARCHAR(20)Deployment location classification such as field, lab, or staging
Tableshardware_assetsasset_deployments
Interviewer

Your question is Monthly Active Asset Growth Rate. Start with the requirements and the two 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.