← Intuit Interview Insights

Intuit·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Had a technical phone screen for a software engineer role at Intuit. One SQL question, pretty focused, felt like they wanted to see if you actually know conditional aggregation or just know how to Google it.

Questions Asked (1)

Q1

Given a coins table and a transactions table, write a single SQL query that returns each coin's name alongside the summed transaction amounts broken out by calendar quarter (Q1 through Q4), plus the total transaction count and total amount across all quarters. Coins with no transactions should still appear in the results with zeros.

Data ModelingTechnical Trade-offs
Author's notes

The QUARTER() function was the part I had to think about for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and expected output, then outline a query that LEFT JOINs coins to transactions and uses conditional aggregation (CASE WHEN) to pivot quarterly sums. Emphasize that the join must preserve all coins, and that COALESCE or IFNULL handles NULLs for zero-transaction coins.

Pro tip: Mention that you'd verify the quarter boundaries and date handling (e.g., using EXTRACT(QUARTER FROM transaction_date)) and consider performance implications of aggregating before joining if the transactions table is large.

1. Clarify requirements and schema

Confirm the columns in coins (e.g., coin_id, name) and transactions (e.g., coin_id, amount, transaction_date), and the exact output format (coin name, Q1-Q4 sums, total count, total amount).

2. Design the join strategy

Use a LEFT JOIN from coins to transactions to ensure all coins appear, even those with no transactions.

3. Apply conditional aggregation

Use SUM(CASE WHEN EXTRACT(QUARTER FROM transaction_date) = 1 THEN amount ELSE 0 END) for each quarter, and COUNT(transaction_id) for total count, SUM(amount) for total amount.

4. Handle NULLs and grouping

Wrap aggregates in COALESCE to return 0 instead of NULL for coins with no transactions, and GROUP BY coin name (and coin_id if needed).

5. Optimize and validate

Consider pre-aggregating transactions by coin and quarter in a subquery to reduce join size, and mentally test edge cases like coins with no transactions and transactions spanning multiple years.

Key Points to Mention

  • LEFT JOIN to preserve all coins
  • Conditional aggregation with CASE WHEN for quarterly sums
  • COALESCE/IFNULL to convert NULLs to zeros
  • EXTRACT(QUARTER FROM date) or equivalent for quarter extraction
  • GROUP BY coin name (and coin_id if names aren't unique)
  • Performance consideration: pre-aggregate transactions if large

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