Find Listings With Repeated Price Cuts Before Going Pending

Last updated: November 29, 2026

Quick Overview

Given a listing_events table of listed, price_change, pending and sold events, return listings that took at least two price reductions before their first pending date, with the number of cuts, total percent cut from list price, and days to pending.

Zillow
Data Manipulation (SQL/Python)
Data Scientist
Zillow
November 29, 2026
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
Medium

0

0

0 solved


Given a listing_events table of listed, price_change, pending and sold events, return listings that took at least two price reductions before their first pending date, with the number of cuts, total percent cut from list price, and days to pending.

Price-cut behavior feeds Zillow market reports, seller guidance and Zestimate features, and it is a good SQL screen because the data is an event log, not a tidy table. The interviewer checks window functions, careful time filtering relative to a per-listing anchor date, and that you count reductions rather than all price changes.

What the Interviewer Expects
  • Anchor on each listing's first pending date and ignore events after it
  • Use LAG ordered by date with a tiebreaker to compare consecutive prices
  • Count only decreases; price increases are not cuts
  • Compute percent cut against the original list price
  • Explain how relists and same-day events are handled
Key Topics to Cover
window functions
LAG
event logs
CTEs
real estate metrics
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
  • A listing is delisted and relisted under a new id. How would you stitch its history?
  • Compute, per metro, the share of pending listings that had two or more cuts, by month.
  • How would you check whether repeated cuts predict a lower sale-to-list ratio?
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

listing_events(event_id, listing_id, event_date, event_type, price). listed carries the original list price, price_change the new asking price, pending and sold carry status. A listing can g...

Approach

CTE 1: first pending date per listing. CTE 2: keep listed and price_change events strictly before that date, and attach the previous price with LAG and the list price with FIRST_VALUE, both or...


Submit Your Answer
Markdown supported

Related Questions