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