SELECT concat(date(alltable.t_stamp), ' ', hour(alltable.t_stamp), ':00') as StartTimestamp,
	concat('H',TIMESTAMPDIFF(HOUR,DATE_FORMAT(alltable.t_stamp,"%Y-%m-%d %H:00:00"),DATE_FORMAT(now(),"%Y-%m-%d %H:00:00"))) as Hour,
	COUNT(*) AS Total_count,
	SUM(alltable.ParcelHistory_TupelLength = 1) AS SingleCarrier,
	SUM(alltable.ParcelHistory_TupelLength = 2) AS DoubleCarrier
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY date(alltable.t_stamp),hour(alltable.t_stamp)
