Skip to content
ML Academy

Analytics

Interview question

  • midlevel
  • 10 minsuggested time
  • 2Data analyst, Data scientist

You have events(user_id, event_name, event_ts) with names 'search', 'select' and 'pay'. Write SQL for the funnel search to select to pay: users reaching each step, step conversion, in the correct order. Users can repeat events, and some pay without searching in the same visit.

Tests: Funnel logic in SQL, counting distinct users rather than events, enforcing step order, and avoiding fan-out when self-joining event tables.

Sign in to practise: answers are saved before model answers are shown.