Currency Conversion

ASKED IN INTERVIEW
2pts
Stripe

Problem Statement

Stripe processes payments globally and often needs to present totals in a unified currency for reporting. You have a table of transactions recorded in Euros (EUR).

Write an SQL query to convert all transaction amounts from EUR to USD using a fixed exchange rate of 1.10.

Rules:

  • The conversion factor is: 1 EUR = 1.10 USD.
  • The converted amount should be rounded to exactly 2 decimal places.
  • Output columns: transaction_id, amount_eur, amount_usd.
  • Results must be returned in descending order based on amount_usd.

Table Schema:

  • Transactions: transaction_id, amount_eur, transaction_date.
Tests your understanding of
Basic SQL, Arithmetic and FinTech

Input Tables

Transactions
transaction_id(INTEGER)amount_eur(DECIMAL)
1001100
100250.5
100310
1004250.75
10055
10061000

Expected Output

transaction_id(INTEGER)amount_eur(DECIMAL)amount_usd(DECIMAL)
100610001100
1004250.75275.83
1001100110
100250.555.55
10031011
100555.5

Tags

EasyASKED IN INTERVIEWBasic SQLArithmeticFinTech
5 min
91%

Hints