<?php
require 'config/db.php';
$stmt = $pdo->query("SELECT last_status, count(*) as c FROM tbl_bookings GROUP BY last_status");
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    echo "STATUS: " . ($row['last_status'] ?? 'NULL') . " -> " . $row['c'] . "\n";
}
echo "TOTAL: " . $pdo->query("SELECT count(*) FROM tbl_bookings")->fetchColumn() . "\n";
echo "BRANCHES: " . $pdo->query("SELECT count(*) FROM tbl_branch")->fetchColumn() . "\n";
?>