Witam, potrzebuje wyciągnąć z bazy sumę rekordów gdzie stan = 1 i stan = 4 - jednym zapytaniem
[sql:1:529de26bd0]select count(idcoś) from tabela where stan = 1[/sql:1:529de26bd0]
[sql:1:529de26bd0]select count(idcoś) from tabela where stan = 4[/sql:1:529de26bd0]
Wiem że trzeba tabelę złączyć i zastosować distinct ale mam zaćmienie.