nikb-de / Some_random_tech_task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tasks assumptions

I assume that query looks like

SELECT
  t.transaction_category_id,
  SUM(t.transaction_amount) AS sum_amount,
  COUNT(DISTINCT t.user_id) AS num_users
FROM transactions t
JOIN users u USING (user_id)
WHERE t.is_blocked = False
  AND u.is_active = True
GROUP BY t.transaction_category_id
ORDER BY sum_amount DESC;

Instead of is_active = 1 because in csv generation is_active is True or False

Also i assume that transaction_amount is Decimal in the transactions table instead of Integer

About


Languages

Language:Python 97.9%Language:Makefile 2.1%