Calculate Average Camera Switches per Session

Read the full interview experience this question came from →

Quick Overview

Calculate average front-to-rear camera switches per session in PostgreSQL. Use LAG, preserve one-event sessions in the denominator, and avoid integer-division errors.

Calculate Average Camera Switches per Session

Company: Snapchat

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

Overview: Calculate average front-to-rear camera switches per session in PostgreSQL. Use LAG, preserve one-event sessions in the denominator, and avoid integer-division errors.

Read the full Snapchat Data Scientist interview experience this question came from

|Home/Data Manipulation (SQL/Python)/Snapchat
Snapchat logo
Snapchat
Aug 13, 2026
mediumData ScientistTechnical ScreenData Manipulation (SQL/Python)
5
0
Loading...
Loading comments...