SELECT
dp.nama, b.*
FROM
besarjttcalon b
LEFT JOIN
datapenerimaan dp
ON
b.idpenerimaan = dp.replid
GROUP BY
b.idcalon, b.idpenerimaan
HAVING COUNT(b.idcalon) > 1
AND COUNT(b.idpenerimaan) > 1;
ORDER BY
b.idcalon
contoh lain
SELECT
dp.nama, b.*
FROM
besarjtt b
LEFT JOIN
datapenerimaan dp
ON
b.idpenerimaan = dp.replid
GROUP BY
b.nis, b.idpenerimaan
HAVING COUNT(b.nis) > 1
AND COUNT(b.idpenerimaan) > 1;
ORDER BY
b.ts
DESC
Post a Comment