Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.