Something is wrong in your syntax obok 'group by k.id order by k.nazwa asc' w linii 1