Hands-on task
PostgreSQL: CTE (WITH)
In the shop database, using a CTE (WITH), compute the order total per customer, then select the name of the customer with the maximum total and write it into /root/top_customer.txt — only the name, without the table header.
- cte
- with
- subquery
- group by
- postgresql