I want to count number of rows for each value displayed from a joined table
2 tables (events and locations)
I want to count events (table events) for each location.Name (table locations)
$resultN = doQuery("SELECT e.PkID
FROM " . HC_TblPrefix . "events e
LEFT JOIN " . HC_TblPrefix . "locations l ON (e.LocID = l.PkID)
WHERE DATE(StartDate) > DATE(CURDATE())
");
Thanks for your help
You can use this query below to count the number of results where
Result from this query will be like this
Location | Count
Madrid 6
Seattle 91