select
case
when daftar ='sd' then kouta
end as a,
case
when daftar = 'smp' then kouta
end as b,
case
when daftar = 'sma' then kouta
end as c
from
ajaran
GROUP BY
tahun
and result error
[Err] ERROR: column "ajaran.daftar" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: select case when daftar='sd' then kouta end as a,case when ...
I'm trying same query in MySQL and no error and success grouping how to use group by in PostgreSQL?
I want to group by tahun
.
This is my table.
GROUP BY
means? What is the meaning oftahun
in this context and how does it relate tokouta
? – Dai