SELECT
    CAST(nasabah.NASABAH_ID AS SIGNED) AS int_cif
    ,TRIM(nasabah.NASABAH_ID) AS cif
    ,CASE
        WHEN nasabah.TGL_BUKA = '0000-00-00' THEN '2008-05-03'
        ELSE nasabah.TGL_BUKA
    END AS tanggal_registrasi_cif
    ,TRIM(nasabah.NAMA_NASABAH) AS nama_nasabah
	,CASE
		WHEN nasabah.JENIS_NASABAH='1' THEN 'Individu'
		ELSE 'Non Invidividu'
	END AS jenis_nasabah
    ,TRIM(nasabah.ALAMAT_DOMISILI) AS alamat
    ,TRIM(nasabah.KOTA) AS kota
    ,TRIM(nasabah.NO_HP) AS no_handphone
    ,TRIM(nasabah.EMAIL) AS email
    ,TRIM(nasabah.no_id) AS nik
    ,nasabah.tgllahir AS tanggal_lahir
    ,TRIM(kodegroup1_nasabah.DESKRIPSI_GROUP1) AS agama
FROM nasabah
LEFT JOIN kodegroup1_nasabah ON nasabah.NASABAH_GROUP1 = kodegroup1_nasabah.NASABAH_GROUP1
ORDER BY nasabah.NASABAH_ID
LIMIT 100
;
