ruby 大量消息报告

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby 大量消息报告相关的知识,希望对你有一定的参考价值。

#Reporte mySQL Envios Massivos.
select a.name as "Cuenta", 
year(mm.created_at), 
month(mm.created_at),
count(distinct mml.id) as "Encolados",
count(IF(mml.status=3,1,NULL)) AS "Con error",
(count(IF(mml.status=4,1,NULL)) + count(IF(mml.status=5,1,NULL))) AS "Enviados",
count(IF(mml.status=5,1,NULL)) AS "Abiertos"
from massive_messages mm
inner join accounts a on mm.account_id = a.id
inner join massive_message_logs mml on mml.massive_message_id = mm.id
where mm.draft = false and year(mm.created_at) = 2016 and month(mm.created_at) =11
group by a.id, year(mm.created_at), month(mm.created_at);

以上是关于ruby 大量消息报告的主要内容,如果未能解决你的问题,请参考以下文章

ruby 令人敬畏的ActiveRecord错误报告脚本。如何在Ruby脚本中使用ActiveRecord和SQLite。

ruby 报告评估台面

ruby 会议报告

ruby 参展商简介报告

ruby 每位参加者的发票报告

Ruby:解析Blackberry下载报告