Merge 'Support column aliases in GROUP BY, ORDER BY and HAVING' from Jussi Saurio

Closes #744
```sql
# Wanda = 9, Whitney = 11, William = 111
do_execsql_test column_alias_in_group_by_order_by_having {
  select first_name as fn, count(1) as fn_count from users where fn in ('Wanda', 'Whitney', 'William') group by fn having fn_count > 10 order by fn_count;
} {Whitney|11
William|111}
```

Closes #864
This commit is contained in:
Pekka Enberg
2025-02-04 14:51:05 +02:00
4 changed files with 91 additions and 43 deletions

View File

@@ -174,4 +174,10 @@ do_execsql_test having_with_multiple_conditions {
David|165|53.0
Robert|159|51.0
Jennifer|151|51.0
John|145|50.0}
John|145|50.0}
# Wanda = 9, Whitney = 11, William = 111
do_execsql_test column_alias_in_group_by_order_by_having {
select first_name as fn, count(1) as fn_count from users where fn in ('Wanda', 'Whitney', 'William') group by fn having fn_count > 10 order by fn_count;
} {Whitney|11
William|111}