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 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
IPv6 vs IPv4 Need
00:00
5 left

IPv6 vs IPv4 Need

MediumSQL · PostgreSQL

Problem

Tell me about why you would need IPv6 over IPv4 and what tradeoffs matter in practice.

Use the endpoint and connection observation data to produce a PostgreSQL comparison of IPv4 and IPv6 operational characteristics.

Output

  1. One row per address family, ordered IPv4 then IPv6.
  2. Columns: address_family, endpoint_count, nat_dependency_pct, observation_count, success_rate_pct, and avg_latency_ms.
  3. Include only IPv4 and IPv6 endpoints. Percentages and average latency must be rounded to two decimal places.

Schema

endpoints
ColumnTypeDescription
endpoint_idPKINTUnique endpoint identifier
endpoint_nameVARCHAR(100)Endpoint display name
address_familyVARCHAR(30)Endpoint address family, such as IPv4 or IPv6
nat_requiredBOOLEANWhether the endpoint requires NAT
connection_observations
ColumnTypeDescription
observation_idPKINTUnique connection observation identifier
endpoint_idINTEndpoint identifier associated with the observation
connection_succeededBOOLEANWhether the connection attempt succeeded
latency_msNUMERIC(10,2)Observed connection latency in milliseconds
Tablesendpointsconnection_observations
Interviewer

Your question is IPv6 vs IPv4 Need. 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.