Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
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
Experiences
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
Build my plan
Dashboard Design for User Segments
00:00
5 left

Dashboard Design for User Segments

MediumSQL · PostgreSQL

Problem

How do you approach designing dashboards for different user segments at The Johns Hopkins University?

For a SQL implementation exercise, translate that requirement into a usage summary for active users during January 2025. Include dashboards intended for a user's segment or for all segments, including dashboards with no views.

Output

  1. One row per eligible user segment and dashboard.
  2. Columns: user_segment, dashboard_name, active_users, distinct_viewers, total_views, and viewer_rate_pct.
  3. Include only active users with a non-null segment and January 2025 views when applicable. Sort by user_segment, then dashboard_name.

Schema

university_users
ColumnTypeDescription
user_idPKINTUnique university user identifier
user_segmentVARCHAR(50)User audience segment
is_activeBOOLEANWhether the user is active
dashboards
ColumnTypeDescription
dashboard_idPKINTUnique dashboard identifier
dashboard_nameVARCHAR(100)Dashboard display name
audience_segmentVARCHAR(50)Intended user segment, or All
dashboard_views
ColumnTypeDescription
view_idPKINTUnique dashboard view identifier
user_idINTUser who viewed the dashboard
dashboard_idINTDashboard that was viewed
viewed_atTIMESTAMPTimestamp of the dashboard view
Tablesuniversity_usersdashboardsdashboard_views
Interviewer

Your question is Dashboard Design for User Segments. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.