Maison > Questions et réponses > le corps du texte
J'avais besoin de "Ouvrir" en 2 et de cliquer en 1, mais maintenant j'obtiens comme Ouvrir en 5 et cliquer en 2
"SELECT COALESCE(sum(requested),0) as requested, COALESCE(sum(processed),0) as processed, COALESCE(sum(open),0) as open, COALESCE(sum(click),0) as click, COALESCE(sum(dropped),0) as dropped, COALESCE(sum(delivered),0) as delivered, COALESCE(sum(spamreport),0) as spamreport, COALESCE(sum(deferred),0) as deferred, COALESCE(sum(bounce),0) as bounce, COALESCE(sum(unsubscribe),0) as unsubscribe FROM CAMPAIGN_REPORTS WHERE _kftCampaingID='".$campaignId."'"
P粉8832233282024-04-05 15:13:20
sum()
按预期工作。如果您希望将 0 以上的任何值视为 1,请编写如下 if 条件。话虽如此,coalesce
Cela semble redondant ici.
sum(if(open is not null and open > 0, 1, 0)), sum(if(click is not null and click > 0, 1, 0))