ShowFormData

<?php
global $wpdb;
$table_name = $wpdb->prefix . 'submitedWebForms';

// Group the records by ReceiverName and MONTH(dateSubmited)
$results = $wpdb->get_results("
    SELECT COUNT(*) as count, ReceiverName, MONTH(dateSubmited) as month
    FROM $table_name
    GROUP BY ReceiverName, MONTH(dateSubmited)
");

// Output the results in an HTML table
echo '<table>';
echo '<tr><th>Receiver Name</th><th>Month</th><th>Count</th></tr>';
foreach ($results as $result) {
    echo '<tr>';
    echo '<td>' . $result->ReceiverName . '</td>';
    echo '<td>' . $result->month . '</td>';
    echo '<td>' . $result->count . '</td>';
    echo '</tr>';
}
echo '</table>';
?>