← Intuit Interview InsightsSoftware Engineer

Intuit·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Intuit SQL round, one meaty question about parsing currency strings stored as VARCHAR. Not a vibe check, they wanted actual working syntax and edge case handling.

Questions Asked (1)

Q1

A database column stores monetary values as VARCHAR strings with suffixes like '1.5M', '2B', or '750K'. Write a SQL query that converts these into true numeric values (K=1000, M=1000000, B=1000000000), then perform aggregation, sorting, or filtering on the result.

Data ModelingTechnical Trade-offs
Author's notes

I got the basic CASE-on-the-last-character approach out pretty fast, something like multiplying CAST(LEFT(val, LEN(val)-1) AS DECIMAL) by the suffix factor.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the database dialect and edge cases, then outline a parsing strategy using string functions to extract the numeric part and suffix. Convert the suffix to a multiplier, compute the numeric value, and finally demonstrate aggregation, sorting, or filtering on the derived column.

Pro tip: Mention that storing monetary values as VARCHAR is an anti-pattern and propose a migration to a DECIMAL column, showing you think beyond the immediate query.

1. Clarify requirements and edge cases

Ask about the database system, data consistency, and handling of invalid or missing values. Confirm whether the query should be a one-time fix or part of a long-term solution.

2. Parse the string into numeric and suffix parts

Use string functions (e.g., SUBSTRING, LEFT, RIGHT, REGEXP) to separate the numeric portion from the suffix (K, M, B). Handle cases where the suffix might be absent or lowercase.

3. Convert suffix to multiplier and compute numeric value

Map each suffix to its multiplier (K=1000, M=1000000, B=1000000000) using a CASE expression, then multiply the parsed number by the multiplier to get the true numeric value.

4. Apply aggregation, sorting, or filtering

Use the computed numeric value in an ORDER BY, WHERE, or aggregate function (e.g., SUM, AVG) to demonstrate the final result. Consider using a subquery or CTE for readability.

5. Discuss trade-offs and alternatives

Highlight performance implications of string parsing and suggest schema improvements, such as storing values as DECIMAL or using a separate multiplier column.

Key Points to Mention

  • Use of CASE statements to map suffixes to multipliers
  • String manipulation functions (SUBSTRING, LEFT, RIGHT, REGEXP) for parsing
  • Handling edge cases: missing suffix, lowercase letters, invalid data
  • Performance considerations: function calls in WHERE clause can prevent index usage
  • Recommendation to normalize schema and store monetary values as DECIMAL
  • Use of CTEs or subqueries to avoid repeating the conversion logic

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