Топ-10 клиентов по количеству товаров в корзине
Условие задачи
Имеются таблицы public.customer и public.carts. Вывести топ-10 клиентов (колонки: id, email), у которых больше всего товаров в корзине с учётом поля amount.
sqlTable "public.carts"
+-------------+-----------------------------+-------------------------+
| Column | Type | Modifiers |
+-------------+-----------------------------+-------------------------+
| sku | bigint | not null |
| country | country_enum | not null |
| customer_id | bigint | not null |
| amount | bigint | not null |
| updated_at | timestamp without time zone | default now() not null |
+-------------+-----------------------------+-------------------------+
Table "public.customer"
+--------+--------+----------+
| Column | Type | Modifiers |
+--------+--------+----------+
| id | bigint | not null |
| email | text | not null |
+--------+--------+----------+