Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
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
SQL: 100th Element Query
00:00
5 left

SQL: 100th Element Query

EasySQL · PostgreSQL

Problem

Akamai engineers need to validate a generated sequence of service positions against metadata for Akamai delivery products. Write a PostgreSQL query that generates the first 120 elements, joins each element to its corresponding product, and returns only the 100th element.

Requirements

  1. Generate integer positions from 1 through 120 using PostgreSQL generate_series.
  2. Map positions cyclically to service IDs 1 through 4 and join them to akamai_products.
  3. Return the 100th position, its service ID, product name, and product family.
  4. Preserve the requested position explicitly with an ORDER BY clause.

Schema

akamai_products
ColumnTypeDescription
service_idPKINTEGERUnique Akamai product service identifier
product_nameVARCHAR(100)Akamai product name
product_familyVARCHAR(100)Product family
region_codeVARCHAR(10)Primary deployment region
edge_service_registry
ColumnTypeDescription
service_idPKINTEGERRegistered service identifier
service_statusVARCHAR(20)Current service status
owner_teamVARCHAR(100)Responsible Akamai team
Tablesakamai_productsedge_service_registry
Interviewer

Your question is SQL: 100th Element Query. 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.