Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
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
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
Get started
LINQ Data Manipulation Series
00:00
5 left

LINQ Data Manipulation Series

MediumSQL · PostgreSQL

Problem

Tell me about implementing a series of data manipulation problems using LINQ or similar query constructs to filter and transform collections.

Use the Filevine matter activity data below. Write a SQL query that returns the requested result set.

Output

  1. One row per matter.
  2. Return the matter name, the most recent completed activity date, and a status label based on the matter's current state.
  3. Include only matters with at least one completed activity.
  4. Sort by most recent completed activity date descending, then matter name ascending.

Schema

matters
ColumnTypeDescription
matter_idPKINTPrimary key for the matter
matter_nameVARCHAR(255)Display name of the matter
is_activeBOOLEANWhether the matter is currently active
practice_areaVARCHAR(100)Optional practice area label
activities
ColumnTypeDescription
activity_idPKINTPrimary key for the activity
matter_idINTReferences the related matter
activity_typeVARCHAR(50)Type of activity
activity_statusVARCHAR(20)Current activity status
activity_dateDATEDate the activity was completed or scheduled
Tablesmattersactivities
Interviewer

Your question is LINQ Data Manipulation Series. Start with the requirements and the two 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.