tinfoil-knight commented on issue #10013:
URL:
https://github.com/apache/arrow-datafusion/issues/10013#issuecomment-2045361264
@cseidman
Try using `SUM(revs.visit_revenue)` or the alias you set i.e.
`total_revenue` instead of `SUM(visit_revenue)` in the `HAVING` & `ORDER BY`
clause.
```sql
with revs
as (
SELECT
customer,
cast(round(CAST(substring(revenue,2) AS float)) as INT) AS
visit_revenue
FROM visits
)
SELECT
customer,
SUM(visit_revenue) as total_revenue
FROM revs
group by customer
having SUM(revs.visit_revenue) > 999
order by SUM(revs.visit_revenue)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]