Revenue from female audience
VK Market's monetization team asks one simple weekly question: how much revenue did the female audience bring. The extract historically carries two gender encodings because different subsystems write differently.
Table purchases:
- user_id INTEGER — buyer id
- user_gender VARCHAR(16) — may be 'female', 'f' (women) or 'male', 'm' (men)
- items INTEGER — units
- price NUMERIC(12,2) — unit price in rubles
- is_promo BOOLEAN — promo flag, ignore here
Sum revenue from female buyers as SUM(price * items), and remember that women appear in the data both as 'female' and as 'f'. Round to 2 decimals.
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.
| income_from_female |
|---|
| 4930.00 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in