Weekend Versus Weekday Posting Ratio for Facebook Groups

Last updated: November 29, 2026

Quick Overview

For each Facebook Group, compare its average posts per weekend day with its average posts per weekday over the last seven full weeks, and list the groups that are most weekend heavy. Normalize by the number of each kind of day, not raw totals.

Meta
Data Manipulation (SQL/Python)
Data Scientist
Meta
November 29, 2026
Data Scientist
Phone Screen
Data Manipulation (SQL/Python)
Easy

0

0

0 solved


For each Facebook Group, compare its average posts per weekend day with its average posts per weekday over the last seven full weeks, and list the groups that are most weekend heavy. Normalize by the number of each kind of day, not raw totals.

A quick SQL question for Groups product analysts, who use day-of-week patterns to decide when to send digests and notifications. The interviewer checks DAY_OF_WEEK handling and whether you normalize by the five-to-two split of days.

What the Interviewer Expects
  • Classify days with DAY_OF_WEEK correctly
  • Divide by the number of weekend and weekday days in the period
  • Apply a minimum activity floor
  • Handle groups with zero weekday posts
  • Rank by the ratio
Key Topics to Cover
DAY_OF_WEEK
normalization
conditional aggregation
ratios
Groups
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you use members' local time instead of UTC?
  • Should you weight by members to compare groups?
  • How would you test whether a group's ratio is significantly above 1?
  • How would this inform digest send times?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

group_posts(post_id, group_id, created_at). The period is seven full weeks, Monday Oct 5 through Sunday Nov 22, 2026, so this week's partial data is excluded. That gives exactly 35 weekdays and 14 w...

Approach

Count weekend and weekday posts per group with conditional sums, divide each by the number of such days in the period, then take the ratio. Totals alone would make every group look weekday heavy, sinc...


Submit Your Answer
Markdown supported