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
Web Scraping With SQL and Debugging
00:00
5 left

Web Scraping With SQL and Debugging

HardSQL · PostgreSQL

Problem

Describe a time you used web scraping with SQL and debugging to deliver a data result.

Use the tables below to identify which scraped records were successfully matched to reference data and which were rejected during validation. Return only the final deliverable rows.

Output

  1. One row per scraped page that passed validation and matched a known source
  2. Columns: page_url, source_name, scraped_title, normalized_title, validation_status
  3. Include only rows where the page was scraped successfully and the source is active
  4. Sort by source_name, then page_url

Schema

scraped_pages
ColumnTypeDescription
page_idPKINTPrimary key for the scraped page
source_idINTReference to the source site
page_urlVARCHAR(255)Scraped page URL
scraped_titleVARCHAR(255)Title captured by the scraper
scrape_statusVARCHAR(20)Scrape outcome such as success or failed
reference_sources
ColumnTypeDescription
source_idPKINTPrimary key for the source
source_nameVARCHAR(255)Human-readable source name
is_activeBOOLEANWhether the source is currently active
title_validations
ColumnTypeDescription
validation_idPKINTPrimary key for the validation record
page_urlVARCHAR(255)Validated page URL
normalized_titleVARCHAR(255)Cleaned title after debugging and normalization
validation_flagVARCHAR(20)Validation outcome
Tablesscraped_pagesreference_sourcestitle_validations
Interviewer

Your question is Web Scraping With SQL and Debugging. 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.