PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Nextdoor

Write SQL for basic user metrics

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency in SQL for relational databases, specifically testing aggregation, joins, date/time grouping, and handling tied results when computing user metrics such as total users, peak signup month, and top-followed users.

  • hard
  • Nextdoor
  • Coding & Algorithms
  • Data Engineer

Write SQL for basic user metrics

Company: Nextdoor

Role: Data Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

You are given a simplified schema for a fictional social app called **Nextagram**: - **users**(user_id PK, username, created_at TIMESTAMP) - **follows**(follower_user_id, followed_user_id, created_at TIMESTAMP) - each row means `follower_user_id` follows `followed_user_id` Assume `created_at` is a timestamp (timezone handling is ignored for this part). Write SQL queries to answer: 1) How many users are there? 2) In which **month** did the most users join? (Return the month and the count.) 3) What is the username of the user with the **most followers**? (If there is a tie, return all tied users.)

Quick Answer: This question evaluates proficiency in SQL for relational databases, specifically testing aggregation, joins, date/time grouping, and handling tied results when computing user metrics such as total users, peak signup month, and top-followed users.

Related Interview Questions

  • Build Ranked Feed With Photo Batching - Nextdoor (medium)
  • Merge Weekly Time Intervals - Nextdoor (medium)
  • Merge overlapping weekly time intervals - Nextdoor (medium)
  • Write SQL for app metrics - Nextdoor (hard)
  • Flatten Nested Comments - Nextdoor (easy)
Nextdoor logo
Nextdoor
Feb 8, 2026, 12:00 AM
Data Engineer
Technical Screen
Coding & Algorithms
1
0

You are given a simplified schema for a fictional social app called Nextagram:

  • users (user_id PK, username, created_at TIMESTAMP)
  • follows (follower_user_id, followed_user_id, created_at TIMESTAMP)
    • each row means follower_user_id follows followed_user_id

Assume created_at is a timestamp (timezone handling is ignored for this part).

Write SQL queries to answer:

  1. How many users are there?
  2. In which month did the most users join? (Return the month and the count.)
  3. What is the username of the user with the most followers ? (If there is a tie, return all tied users.)

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Nextdoor•More Data Engineer•Nextdoor Data Engineer•Nextdoor Coding & Algorithms•Data Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.