You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select u.username, sum(r.cost) as cost from auth_user u join bsms_smsrecipient r on u.id=r.user_id where r.time_sent > '2017-03-15 00:00:00' and r.time_sent < '2017-03-15 23:59:59' group by u.username order by cost desc;
select sum(cost)from bsms_smsrecipient where time_sent >= '2017-03-14 00:00:00' and time_sent <= '2017-03-15 00:00:00';