<?php
class Dashboard {
    public static function selectAllStateCourse(){
        global $wpdb;

        $sql = "
            SELECT state, count(IDRace) AS count FROM cass_race GROUP BY state;
        ";
        $sql = $wpdb->prepare($sql);
    
        return $wpdb->get_results($sql);
    }
}