On Wed, 2020-04-01 at 19:39 -0400, David Gauthier wrote:
> psql (9.6.7, server 11.3) on linux
>
> I want to do something like this
> (intentionally bad sql but will illustrate the need)
>
> select s.name,s.grade from students s where s.class='math'
> union
> select 'whole class', class_grade fro
On Wednesday, April 1, 2020, David Gauthier
wrote:
> psql (9.6.7, server 11.3) on linux
>
> I want to do something like this
> (intentionally bad sql but will illustrate the need)
>
> select s.name,s.grade from students s where s.class='math'
> union
> select 'whole class', class_grade from all_c
psql (9.6.7, server 11.3) on linux
I want to do something like this
(intentionally bad sql but will illustrate the need)
select s.name,s.grade from students s where s.class='math'
union
select 'whole class', class_grade from all_classes where class=s.class
Of course it's that "where class=s.clas