From KYC Submission to Approval

From KYC Submission to Approval

You are the product analyst at a fintech startup that opens digital accounts for small businesses. The acquisition team wants to know which signup channels bring customers who actually complete identity verification, not just registrations. Build one report row for every signup channel. A customer starts the funnel when they have at least one application_submitted event with a non-null timestamp. Their start time is the earliest such timestamp. A customer is approved when they have at least one non-null application_approved event at or after that start time. An approval recorded before the first submission does not count. Repeated events from the same customer must not inflate any count. Include every channel present in kyc_customers, even when nobody in that channel started an application. Display a NULL signup_channel as unknown. Return columns: - channel — signup channel, text. - total_customers — registered customers in the channel, integer. - started_customers — customers who submitted an application, integer. - approved_customers — started customers who were later approved, integer. - conversion_rate_pct — approved customers as a percentage of started customers, numeric, rounded to 2 decimal places. Return 0.00 when there are no started customers. Sort by channel ascending. Ignore events whose event_time is NULL. An approval at exactly the submission timestamp counts.

Exemplo de resposta esperada

É assim que se parece uma resposta correta: ela tem seu próprio número de linhas e não precisa coincidir com as tabelas do esquema. Sua resposta precisa retornar os mesmos nomes de colunas do exemplo: use AS para renomeá-las se for preciso.

channeltotal_customersstarted_customersapproved_customersconversion_rate_pct
offline2100
organic222100
paid_search22150
PostgreSQLv16
Entre para enviar

O resultado da sua consulta aparecerá aqui

Focus radio
Paused · SomaFM · Fluid