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
Author Counts and Website/No-Sale Rates
00:00
5 left

Author Counts and Website/No-Sale Rates

MediumSQL · PostgreSQL

Problem

Find the total number of registered authors, the percentage of them who have a website URL containing ".com", and the percentage who have never made a sale.

Use the authors and sales tables. Return one summary row with the requested totals and percentages.

Output

  1. Columns: total_registered_authors, pct_with_com_website, pct_never_made_sale
  2. One row containing all registered authors, with percentages rounded to two decimal places.

Schema

authors
ColumnTypeDescription
author_idPKINTUnique registered author identifier
author_nameVARCHAR(100)Author display name
website_urlVARCHAR(255)Optional author website URL
sales
ColumnTypeDescription
sale_idPKINTUnique sale identifier
author_idINTAuthor associated with the sale
sale_amountDECIMAL(10,2)Amount collected for the sale
Tablesauthorssales
Interviewer

Your question is Author Counts and Website/No-Sale Rates. 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.