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
HTTP Caching and SSL Basics
00:00
5 left

HTTP Caching and SSL Basics

MediumSQL · PostgreSQL

Problem

Explain how SSL certificates and HTTP cache headers affect a web service in production.

Using the provided service, certificate, cache-header, and request tables, write a query that summarizes these production effects for each service as of 2025-03-08.

Output

  1. One row per service, including services without matching certificate, cache, or request records.
  2. Return service_name, endpoint, certificate_status, cache_policy, request_count, average_response_ms, and cache_hit_rate_percent.
  3. Classify certificates as valid, expiring, expired, or missing, and cache policies as revalidatable, cacheable, no-cache, or missing.
  4. Include requests from 2025-03-01 through 2025-03-08, and order by endpoint ascending.

Schema

web_services
ColumnTypeDescription
service_idPKINTUnique service identifier
service_nameVARCHAR(100)Service display name
endpointVARCHAR(150)HTTP endpoint path
ssl_certificates
ColumnTypeDescription
cert_idPKINTUnique certificate identifier
service_idINTReferenced service
issued_atDATECertificate issue date
expires_atDATECertificate expiration date
tls_versionVARCHAR(20)Negotiated TLS version
is_currentBOOLEANWhether this is the active certificate
http_cache_headers
ColumnTypeDescription
header_idPKINTUnique header observation
service_idINTReferenced service
captured_atDATEDate headers were captured
cache_controlVARCHAR(100)Observed Cache-Control header
max_age_secondsINTMaximum cache lifetime in seconds
etag_presentBOOLEANWhether an ETag header was present
service_requests
ColumnTypeDescription
request_idPKINTUnique request identifier
service_idINTReferenced service
requested_atDATERequest date
status_codeINTHTTP response status code
response_msDECIMAL(10,2)Response latency in milliseconds
cache_hitBOOLEANWhether the response was served from cache
Tablesweb_servicesssl_certificateshttp_cache_headersservice_requests
Interviewer

Your question is HTTP Caching and SSL Basics. Start with the requirements and the four 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.