DataDrivenDataDriven
LearnPracticeInterviewDiscussDailyJobs

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 make shoppers settle for the top hit. In `search_queries`, `clicked_result` holds the position of the result a shopper clicked, where 1 is the top result and an empty value means no click. For each search term length, show the total number of queries and how many ended in a click 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