SQLSTATE[42S02]: Base table or view not found: 1146 Table 'luxury_dealz.coupon_logs' doesn't exist (Connection: mysql, SQL: select count(*) as aggregate from (select `coupon_code`, COUNT(*) as clicks, SUM(CASE WHEN action = 'reveal' THEN 1 ELSE 0 END) as reveals, COUNT(DISTINCT user_ip) as unique_users, DATE(created_at) as date from `coupon_logs` group by `coupon_code`, `date`) as `aggregate_table`)