select c.kode as data from perkara_banding_detil a
join pihak b on a.pihak_id=b.id
join tingkat_pendidikan c on b.pendidikan_id=c.id
where a.status_pihak_id=1 and a.urutan_banding=1 and a.perkara_id=#perkara_id#