Flag Underused Subscription Seats by Account and Product

Last updated: November 29, 2026

Quick Overview

Using a subscriptions table (account, product, seats purchased, status) and a usage events table (account, user, product, event date), list active subscriptions where fewer than half of purchased seats had any usage in October 2026, ordered by the number of idle seats.

Autodesk
Data Manipulation (SQL/Python)
Data Scientist
Autodesk
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Easy

0

0

0 solved


Using a subscriptions table (account, product, seats purchased, status) and a usage events table (account, user, product, event date), list active subscriptions where fewer than half of purchased seats had any usage in October 2026, ordered by the number of idle seats.

Since Autodesk sells named-user subscriptions to products like AutoCAD, Revit and Fusion, seat utilization drives renewal risk and customer success outreach. This screen checks join choice, distinct counting, and not losing accounts with zero usage.

What the Interviewer Expects
  • Aggregate distinct active users per account and product first
  • LEFT JOIN from subscriptions so zero-usage subscriptions survive
  • Use COALESCE and force decimal division
  • Filter to active subscriptions and guard against zero seats
  • Use a half-open date range for the month
Key Topics to Cover
LEFT JOIN
COUNT DISTINCT
Date filtering
Subscription analytics
NULL handling
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you change this to use a rolling 30 day window per account renewal date?
  • What counts as active: launching the product, or doing meaningful work like saving a file?
  • How would you produce a monthly trend of utilization per account?
  • How would you account for users who are licensed across a multi-product collection?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

subscriptions(account_id, product, seats_purchased, status), one row per account and product. usage_events(account_id, user_id, product, event_date), many rows per user per day. I would confirm th...

Approach

Pre-aggregate usage to (account, product) -> distinct users for October so the join is one to one. LEFT JOIN subscriptions to it, since a subscription with zero usage is the most important row to fl...


Submit Your Answer
Markdown supported

Related Questions