PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/xAI

Design a schema for server engagement

Last updated: Apr 2, 2026

Quick Overview

This System Design question evaluates a data engineer's competency in dimensional data modeling, event-driven fact table design, time-series aggregation, and SQL-based analytics within the data warehousing and ETL domain, testing both conceptual understanding of fact-dimension schemas and practical application of SQL for production analytics.

  • medium
  • xAI
  • System Design
  • Data Engineer

Design a schema for server engagement

Company: xAI

Role: Data Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

You are building analytics for a chat platform similar to Discord. The raw event sources are: - `server(server_id, creator_id, created_at)` - `server_view(server_id, user_id, viewed_at)` - `server_join(server_id, user_id, joined_at)` - `message(message_id, server_id, channel_id, user_id, sent_at)` Tasks: 1. Design a fact-dimension data model that can support analytics on servers, views, joins, and messages. 2. Write SQL to compute the average weekly number of `server_view` events during calendar year 2020. 3. Write SQL to compute the week-over-week change in `server_view` events over the most recent 12 months. 4. Explain how you would handle missing weeks in the time series. 5. Write SQL to return, for every server, the all-time count of server views, server joins, and messages.

Quick Answer: This System Design question evaluates a data engineer's competency in dimensional data modeling, event-driven fact table design, time-series aggregation, and SQL-based analytics within the data warehousing and ETL domain, testing both conceptual understanding of fact-dimension schemas and practical application of SQL for production analytics.

Related Interview Questions

  • Build a One-Pass Data Cleaning Pipeline - xAI (medium)
  • Design a multi-level API rate limiter - xAI (easy)
  • Design a backend for an online checkers game - xAI (medium)
  • Design a follower push-notification system - xAI (hard)
  • Design backend to score and classify tweets - xAI (medium)
xAI logo
xAI
Jan 17, 2026, 12:00 AM
Data Engineer
Technical Screen
System Design
8
0

You are building analytics for a chat platform similar to Discord. The raw event sources are:

  • server(server_id, creator_id, created_at)
  • server_view(server_id, user_id, viewed_at)
  • server_join(server_id, user_id, joined_at)
  • message(message_id, server_id, channel_id, user_id, sent_at)

Tasks:

  1. Design a fact-dimension data model that can support analytics on servers, views, joins, and messages.
  2. Write SQL to compute the average weekly number of server_view events during calendar year 2020.
  3. Write SQL to compute the week-over-week change in server_view events over the most recent 12 months.
  4. Explain how you would handle missing weeks in the time series.
  5. Write SQL to return, for every server, the all-time count of server views, server joins, and messages.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More xAI•More Data Engineer•xAI Data Engineer•xAI System Design•Data Engineer System Design
PracHub

Master your tech interviews with 8,000+ 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.