regarding to this question, i have a problem if use that query for count some data. How to make it can count data for ex. from 2010-01 until 2010-05?
after use that query the show as null. this is my query:
SELECT id, Line, COUNT( Serial_number ) AS Qty,
SUM(S), SUM(A), SUM(B), SUM(C),
(SUM( S ) + SUM( A ) + SUM( B ) * 0.4 + SUM( C ) * 0.1) / COUNT( Serial_number ) AS QP
FROM `inspection_report`