How to use grouping correctly in this query:
$sQuery = "SELECT id,DATE(A.Inspection_datetime) AS Date,
A.Model, COUNT(A.Serial_number) AS Qty,
B.name
FROM inspection_report AS A
LEFT JOIN Employee AS B
ON A.NIK=B.NIK
GROUP BY Date, B.name".$sWhere.$sOrder.$sLimit;
i'm really new in concatenation.