PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates proficiency in SQL-based data manipulation and analytical querying, focusing on relational schema navigation, joins, aggregation, filtering, and handling temporal and conditional metrics within a library dataset.

  • Medium
  • Meta
  • Data Manipulation (SQL/Python)
  • Data Engineer

Write SQL for library analytics

Company: Meta

Role: Data Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

Given a library database, write SQL to answer the following: 1) Count the number of books that are currently not returned (i.e., still checked out) and are in good condition. 2) Among those currently not returned and in good condition, compute the percentage that have been renewed more than 2 times (use that subset as the denominator). 3) Return the top 3 book titles or IDs that have more than 10 copies and the longest total lending time across all their loans (sum of loan durations). 4) Find the member–referrer pair with the greatest difference in the number of reservations they have made, and return the pair and the difference.

Quick Answer: This question evaluates proficiency in SQL-based data manipulation and analytical querying, focusing on relational schema navigation, joins, aggregation, filtering, and handling temporal and conditional metrics within a library dataset.

Last updated: Mar 29, 2026

Loading coding console...

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.

Related Coding Questions

  • Compute ad impression conversion rates - Meta (medium)
  • Count unconnected posts and reactions - Meta (medium)
  • Count heavy callers in 7 days - Meta (medium)
  • Write SQL for call metrics - Meta (medium)
  • Write SQL for multi-account metrics - Meta (medium)