Home > database > Grouping sum after how null values and other results calculated
Grouping sum after how null values and other results calculated
Time:09-18
Data as follows, because a statement execution result is empty, and the second value addition results or empty, how to avoid the wrong results Bosses, please help, thank you The table name: Class1 table name: Class2 Student Course Score - column names Student Course Score - column name Zhang SAN's 78 zhang SAN's language is 78 Li si Chinese 78 li si math 78 Fifty and Chinese 80
with c1 as (select sum (Score) s, a student from Class1 where student='Cathy' group by student),
C2 as (select sum (Score) s, student from Class2 where student='Cathy' group by student),