PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates competency with SQL anti-joins, join semantics, deduplication, and correct pre-aggregation filtering to prevent excluded entities from affecting aggregated monthly and year-over-year metrics; it is categorized as Data Manipulation (SQL/Python) for a Data Scientist role.

  • Medium
  • Intuit
  • Data Manipulation (SQL/Python)
  • Data Scientist

Exclude free subscribers via anti-join

Company: Intuit

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

Extend your previous monthly new-subscriber + YoY query to exclude companies that ever received a free subscription, using an anti-join against Free_Subs. Ensure excluded companies are removed from all months and all derived YoY metrics. Your solution should be resilient to duplicates in Free_Subs and should not accidentally re-include rows due to joins. Also, briefly explain in comments the trade-offs between using NOT EXISTS versus LEFT JOIN ... IS NULL for this anti-join under typical OLAP columnar engines. Additional table and sample data: Free_Subs +------------+ | company_id | +------------+ | 2 | | 5 | +------------+ Requirements: - Do not change the output column names/types from the first question. - The anti-join must occur before aggregation so excluded IDs do not affect zero-filled months or YoY baselines. - Guard against duplicate company_id values in Free_Subs (e.g., use DISTINCT or NOT EXISTS).

Quick Answer: This question evaluates competency with SQL anti-joins, join semantics, deduplication, and correct pre-aggregation filtering to prevent excluded entities from affecting aggregated monthly and year-over-year metrics; it is categorized as Data Manipulation (SQL/Python) for a Data Scientist role.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Calculate Cohort Retention - Intuit (medium)
  • Compute Cohort Retention Rate - Intuit (medium)
  • Compute monthly signups, conversion, and YoY growth - Intuit (easy)
  • Pivot daily users and revenue by platform - Intuit (easy)
  • Design an idempotent churn ETL pipeline - Intuit (Medium)