Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

IPv6 vs IPv4 Need

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is IPv6 vs IPv4 Need. Start with the requirements and the two tables on the right.

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.

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
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results