What Cities View and Buy
What Cities View and Buy
L. is checking how product interest turned into purchases across different cities. For each city, separately count product_view and purchase events, using a condition-based counter for each metric.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.
| city | views | purchases |
|---|---|---|
| Khvostov | 0 | 1 |
| Kotovsk | 1 | 0 |
| Miausino | 0 | 1 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid