FastPrepConvert M/B Amount Strings to Numbers
Problems/Convert M/B Amount Strings to Numbers

Convert M/B Amount Strings to Numbers

Intuit logoIntuit● EasyNEW GRADOA

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: Reported in an Intuit new grad online assessment. The report says the SQL task needs converting Varchar values to numbers, with currency markers M and B.

The schema and exact format are missing. Here, an unsigned amount string ends in M or B, has at most two fractional digits, and expands to exact integer base units. Output rows sort by ID.

Our version is about 70% the same as the reported question.

The amounts table contains a unique id and a text value amount_text. Convert each text value into its numeric amount in base units. Return columns id and amount, ordered by id ascending.

For this exercise, assume the text contains an unsigned decimal coefficient followed immediately by uppercase M or B. M means one million and B means one billion. Multiply the coefficient by the matching magnitude.

The coefficient has one to seven digits before an optional decimal point, followed by one or two fractional digits when the point is present. Leading zeros are allowed. There are no signs, spaces, commas, or currency prefixes. All input values follow this format. Because there are at most two fractional digits, every expanded amount is an exact integer.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

amounts

ColumnTypeNullableDescription
idIntegerNoUnique positive record ID.
amount_textTextNoValid unsigned decimal coefficient followed by M or B.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
idIntegerNo—
amountIntegerNo—

Row order: must match exactly. Numeric tolerance: 0.

Constraints

  • For this exercise, assume the table contains 0 to 100 rows.
  • IDs are unique integers from 1 through 1000000000.
  • Coefficients are between 0 and 1000000, inclusive.
  • Every amount_text value follows the stated ASCII decimal-plus-suffix format and has at most 11 characters.
  • Neither column is NULL. The expanded amount is at most 1000000000000000.

More Intuit Online Assessment questions

  • Employee Promotion OpportunitiesOA · Seen Oct 2026
  • Next Pascal Row CoefficientOA · Seen Oct 2026
  • Parse Router LogsOA · Seen Oct 2026
  • Longest Repeated Letter Block with Adjacent SwapsOA · Seen Oct 2026
  • Maximum Square-Free DivisorOA · Seen Oct 2026
  • Two Tribes from Taller-Person CountsOA · Seen Oct 2026
  • Shortest Path from an Encoded GraphOA · Seen Sep 2026
  • Oldest and Youngest EmployeesOA · Seen Sep 2026
  • Pressure-Isolation Shutdown OrderOA · Seen Sep 2026
  • Submask Sum QueriesOA · Seen Sep 2026

Similar questions at other companies

  • Students Scoring Above AverageCapstone Investment Advisors · OA
  • Bond Interest Summary Above 3%Wells Fargo · OAWells Fargo interview questions
  • Students and Their SubjectsBirla Pivot · OA
  • Companies with Average Salary Above 40000AT&T · OAAT&T interview questions
  • Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
  • Weekend Appointments for Consular Services ReschedulingMcKinsey & Company · OAMcKinsey & Company interview questions
  • Companies Above a Salary ThresholdVerisk · OA
  • Customer Resource Usage AnalysisIBM · OAIBM interview questions
  • Customers Who Never OrderedAccenture · OAAccenture interview questions
  • First Duplicate Transaction Within Ten MinutesLenskart · OA

Interview reports that mention this question

  • Intuit OA: What It Tests (2026)

Intuit interview experiences

  • Intuit Software Engineering Intern - Full Stack OA Format
All Intuit interview questionsSee Intuit hiring insights