PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates a candidate's data-manipulation competency in SQL and Python, focusing on computing net pay, aggregating over a calendar quarter, and measuring percentage change between recent pay periods.

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

Calculate Net Pay Change for Q1 2023 Decreases

Company: Gusto

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

EMPLOYEES +-------------+------------+-------+ | employee_id | hire_date | state | +-------------+------------+-------+ | 101 | 2022-04-01 | CA | | 102 | 2021-11-12 | NY | | 103 | 2020-07-20 | TX | +-------------+------------+-------+ ​ PAYROLL_TRANSACTIONS +----------------+-------------+------------+-----------+------------+ | transaction_id | employee_id | paid_at | gross_pay | deductions | +----------------+-------------+------------+-----------+------------+ | 1 | 101 | 2023-01-15 | 5000 | 500 | | 2 | 101 | 2023-02-15 | 5000 | 550 | | 3 | 102 | 2023-01-15 | 4500 | 400 | | 4 | 103 | 2023-01-15 | 6000 | 600 | | 5 | 102 | 2023-02-15 | 4500 | 450 | +----------------+-------------+------------+-----------+------------+ ##### Scenario Online SQL screen evaluating day-to-day data-manipulation skills on Gusto payroll data ##### Question Write a SQL query that returns each employee’s total net pay (gross_pay – deductions) for the first calendar quarter of 2023. For every employee, show the percentage change in net pay between their two most recent pay periods and filter to those whose net pay decreased. ##### Hints Window functions or self-joins can help with pay-period comparisons.

Quick Answer: This question evaluates a candidate's data-manipulation competency in SQL and Python, focusing on computing net pay, aggregating over a calendar quarter, and measuring percentage change between recent pay periods.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 8,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.