← Uber Interview Insights

Uber·Software Engineer·Online Assessment (OA)·Junior

JuniorRejected
May 2026

Summary

Took the Uber Data Analyst Intern online assessment and pretty much fell apart on the SQL section. The MCQs were fine but I blanked on window functions mid-test and ran out of time on the second SQL problem. Not expecting to move forward.

Questions Asked (2)

Q1

SQL window function problem requiring PARTITION BY and ROW_NUMBER to rank or filter records.

Product Analytics & MetricsData Modeling
Author's notes

I knew what the question was asking, sort of, but the syntax just evaporated from my brain mid-test.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the business question and the grain of the data, then outline the window function logic using PARTITION BY and ORDER BY before writing the final query. Use ROW_NUMBER (or RANK/DENSE_RANK) to assign ranks within partitions and filter to the desired rows, explaining each step along the way.

Pro tip: Always confirm the tie-breaking rules and whether the ranking should be deterministic; mention that ROW_NUMBER gives unique ranks while RANK/DENSE_RANK handle ties differently, and choose based on the business need.

1. Clarify the requirement

Ask questions to understand the exact output: which records to rank or filter, the partition key, the ordering column, and how ties should be handled.

2. Define the window

Specify the PARTITION BY columns (e.g., user_id, category) and the ORDER BY columns (e.g., timestamp DESC, amount DESC) that determine the ranking.

3. Choose the ranking function

Select ROW_NUMBER for unique sequential ranks, RANK for gaps on ties, or DENSE_RANK for no gaps; justify your choice based on the business logic.

4. Write the query with a subquery or CTE

Use a common table expression (CTE) or subquery to compute the window function, then filter the outer query to keep only the desired rows (e.g., rn = 1).

5. Validate and discuss performance

Check edge cases (nulls, duplicates, ties) and mention indexing or partitioning strategies to optimize the window function for large datasets.

Key Points to Mention

  • PARTITION BY divides data into groups; ORDER BY determines the sequence within each group.
  • ROW_NUMBER assigns a unique sequential integer to each row within a partition, starting at 1.
  • RANK and DENSE_RANK differ in how they handle ties: RANK leaves gaps, DENSE_RANK does not.
  • Filtering on window functions requires a subquery or CTE because window functions are evaluated after WHERE.
  • Performance considerations: window functions can be expensive; ensure proper indexing and avoid unnecessary sorting.
  • Common use cases: deduplication, top-N per group, running totals, and ranking for analytics.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

A second SQL problem that required multi-step query logic under a time constraint.

Product Analytics & MetricsData Modeling
Author's notes

Opened it with 10 minutes left, wrote two lines, stared at the screen.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, restate the problem in your own words to confirm understanding, then break it into logical sub-steps and outline the SQL operations needed for each. Write the query incrementally, testing each part mentally or with sample data, and optimize for clarity and performance under time pressure.

Pro tip: Before diving into complex SQL, clarify the expected output format and edge cases with the interviewer; this shows you think about correctness and scalability, not just syntax.

1. Clarify requirements and constraints

Ask questions to confirm the input tables, desired output, and any time or performance constraints. This ensures you solve the right problem and avoid rework.

2. Break down the logic into sub-problems

Decompose the multi-step query into smaller, manageable parts (e.g., filtering, aggregating, joining). Identify the order of operations and any dependencies.

3. Outline the SQL structure

Sketch the query skeleton using CTEs or subqueries to modularize each step. This makes the logic clear and easier to debug under time pressure.

4. Write and validate incrementally

Implement each part step by step, mentally testing with sample data or explaining expected results. Check for correctness and edge cases as you go.

5. Optimize and review

Review the final query for performance (e.g., indexing, avoiding unnecessary joins) and readability. Discuss potential improvements or trade-offs with the interviewer.

Key Points to Mention

  • Use of CTEs (Common Table Expressions) for readability and modularity
  • Window functions for ranking, running totals, or comparisons
  • Proper handling of NULLs and edge cases
  • Join strategies (INNER, LEFT, etc.) and their impact on results
  • Aggregation and grouping logic
  • Query performance considerations (indexes, filtering early, avoiding SELECT *)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.