DataDrivenDataDriven
LearnPracticeInterviewDailyJobsCommunity

First Among Results

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.

Domain
SQL
Difficulty
hard
Seniority
L4

Problem

The search relevance team wants to know whether longer queries push shoppers onto the very first hit. In `search_queries`, look only at searches that ended in a click: `clicked_result` holds the position of the result clicked, where 1 is the top result and an empty value means no click. For each search term length, show how many of these clicked searches there were and how many landed on that top result, from shortest term to longest.

Summary

When queries run long, does the top hit still win?

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • SQL Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons