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
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess 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
Analyze Feedback by Channel Segment
00:00
5 left

Analyze Feedback by Channel Segment

MediumSQL · PostgreSQL

Problem

You are given customer feedback submitted across DISH touchpoints such as the MyDISH app, chat, phone, and web. Write a PostgreSQL query that returns feedback performance by channel, product_name, and region_name for feedback submitted in Q1 2024. For each combination, show the total number of feedback records, average rating rounded to 2 decimals, counts of positive and negative feedback based on rating, and rank the combinations within each channel by lowest average rating so the most problematic segments appear first. Only include groups with at least 2 feedback records.

Schema

feedback
ColumnTypeDescription
feedback_idPKINTUnique feedback record identifier
customer_idINTCustomer who submitted the feedback
product_idINTReferenced product identifier
submitted_atDATEDate the feedback was submitted
channelVARCHAR(50)Feedback channel such as MyDISH App, Chat, Phone, or Web
ratingINTCustomer rating on a 1 to 5 scale
comment_textTEXTOptional free-text feedback comment
products
ColumnTypeDescription
product_idPKINTUnique product identifier
product_nameVARCHAR(100)DISH product or service name
customers
ColumnTypeDescription
customer_idPKINTUnique customer identifier
region_nameVARCHAR(50)Customer region
Tablesfeedbackproductscustomers
Interviewer

Your question is Analyze Feedback by Channel Segment. 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.