I'm using POSTGRESQL database:

![database](https://www.postgresqltutorial.com/postgresql-sample-database/)

and I need to return customer's first name, last name and sum of hours they kept a film above certain limit, say 10. I wrote such query:

```
SELECT customer.first_name AS first_name, customer.last_name AS last_name,
       DATE_PART('day', rental.return_date - rental.rental_date)*24 + DATE_PART('hour', return_date - rental_date) AS sum
FROM rental JOIN
     customer
     ON rental.customer_id = customer.customer_id
GROUP BY sum, first_name, last_name
HAVING MIN(sum) > 10;

```

But it says there is no column such as sum. How can I overcome this issue?