Skip to content
Founding beta: 7 of 50 free spots leftClaim yours

'Top products by region' shows three rows for the whole company

Bug huntMediumPython · PostgresDatabase35 min

REG-77: "Top products by region" shows three rows in total

Reported by: Tomas Lindqvist (Regional Sales, Tarn Foods) · Priority: Medium · Component: Regional sales dashboard

Hi, the Top products by region view is wrong. It is supposed to show the best sellers for each region, but this morning it shows just three rows for the whole company: two from Iberia and one from DACH, and nothing at all for the Nordics. There is also a product, Olive Oil, whose net units are blank. And Pretzels in DACH shows 180 although the warehouse says they sold much more than that net of returns (warehouse export attached, one line per delivery batch). When I looked at last quarter's screenshot it was fine, but it was a quiet month. Can you have a look before the regional review on Thursday?

Support note (Soren): I checked two regions against the warehouse export by hand; the underlying data is fine. The dashboard as it looked this morning is attached.

Expected

For each region its best-selling products by net units (sold minus returned), ranked within that region. The Nordics should lead with Oat Milk (190 net units).

Actual

Three rows for the whole company, none for the Nordics, one blank net-units value.

© AICodingRound. Ticket text for practice on this site; see Terms.

How it works

  1. 1Fix the problemin a real codebase.
  2. 2Use your ownAI, or none.
  3. 3Submit, then answera few short questions.
  4. 4Get your gradeand feedback.

Guides that use this problem

All guides

More on SQL practice

View all

Related problems

View all