Atterna
RUEN

Junior data analyst interview · question 3

Be sure of the number before you say it.

Your JOIN says €1,239,937.66. Finance says €552,645.36. Who’s right?

SELECT SUM(o.items_total_eur)
FROM orders AS o
JOIN order_items AS i
  ON i.order_id = o.order_id
WHERE o.status = 'paid'
SUM
€1,239,937.66
Paid orders since 31 August. You joined order_items to filter by product later.

Pick your answer

New to SQL? Learn SQL from zero — free Keep your progress: free account