select('`date` as `labels`') ->selectSum('`hits`', '`values`') ->where([ '`podcast_id`' => $podcastId, '`date` >' => date('Y-m-d', strtotime('-1 year')), ]) ->groupBy('`labels`') ->orderBy('`labels``', 'ASC') ->findAll(); cache()->save( "{$podcastId}_analytics_podcast_by_day", $found, 14400 ); } return $found; } }