Postingan lainnya
Memanggil isi subquery
gan ijin bertanya saya ada query seperti ini
SELECT COUNT(a.enquiry_from) AS valid
FROM crm AS a
JOIN
(
select DATE(created_at) as tanggal,
sum(case when enquiry_from=0 then 1 else 0 end) as whatsap,
sum(case when enquiry_from=2 then 1 else 0 end) as calling,
sum(case when enquiry_from=5 then 1 else 0 end) as email,
sum(case when enquiry_from=6 then 1 else 0 end) as book,
sum(case when enquiry_from=1 then 1 else 0 end) as sms,
SUM(case when enquiry_from=7 then 1 else 0 END) as reference
from `crm_counts`
GROUP BY tanggal
) AS b
ON DATE(a.created_at)=DATE(b.tanggal)
GROUP BY a.created_at
bagaimana saya menampilkan whatsap,calling, dll?
0
1 Jawaban:
Keluarkan semua hasil query kamu die(var_dump($hasiQuery)) nanti akan terlihat strukturnya
0