Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Start free
SQL and Lark Development Views
00:00
5 left

SQL and Lark Development Views

MediumSQL · PostgreSQL

Problem

Tell me about your understanding of SQL and your thoughts on Lark and future developments.

For the practical portion, write a query that analyzes active Lark user engagement with each feature during February 2026.

Output

  1. One row per Lark feature, including features with no qualifying activity.
  2. Return feature_name, report_month, active_users, event_count, and adoption_pct.
  3. Sort by adoption percentage descending, then feature name ascending.

Output details

  • Treat February 2026 as timestamps from 2026-02-01 00:00:00 inclusive through 2026-03-01 00:00:00 exclusive.
  • Format report_month as YYYY-MM.
  • Count each active user once per feature, using users with is_active = TRUE.
  • Calculate adoption_pct against the total number of active users across Lark.
  • Round adoption_pct to two decimal places and return zero when no active users exist.
  • Count all feature events in the period, including events from inactive or unmatched users.

Schema

lark_users
ColumnTypeDescription
user_idPKINTUnique Lark user identifier
user_nameVARCHAR(100)Display name of the user
roleVARCHAR(50)Primary user role
is_activeBOOLEANWhether the account is currently active
lark_features
ColumnTypeDescription
feature_idPKINTUnique Lark feature identifier
feature_nameVARCHAR(100)Name of the Lark feature
lark_events
ColumnTypeDescription
event_idPKINTUnique feature event identifier
user_idINTUser who generated the event
feature_idINTFeature associated with the event
actionVARCHAR(50)Action performed by the user
event_timestampTIMESTAMPTimestamp when the event occurred
Tableslark_userslark_featureslark_events
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the three tables are in the Question tab.

Sign up free to run or submit. Log in
CodePostgreSQL
Sign up free to run your code. Your draft is saved.Run with a free accountLog inLn 1
Run your query to see results here.