
tabela1: kategoria
1 id_kat
2 kategoria
tabela2: foto
1 id_foto
2 id_kat
SELECT kategoria.kategoria, kategoria.id_kat, count( foto.id_foto ) AS ile FROM foto INNER JOIN kategoria ON kategoria.id_kat = foto.id_kat GROUP BY foto.id_kat
prosze uzywac odpowiednich tagów w tym wypadku [ sql ]
alek
i kupa ... : ERROR: column "kategoria.kategoria" must appear in the GROUP BY clause or be used in an aggregate function
a kurcze jak w takim wypadku mam wyciągnac te dane


nie kumam .. w innych bazach to śmiga bez problemu


pozdro for all