	Select
		roundtime,
		Total_count,singlecarrier_count,doublecarrier_count,
		Total_count/Total_count as Total_perc,
    	singlecarrier_count/Total_count as SingleCarrier_perc,
   		doublecarrier_count/Total_count as DoubleCarrier_perc,
    	Total_count*3600/TIMESTAMPDIFF(second, :starttime, :endtime) as Total_rate,
		singlecarrier_count*3600/TIMESTAMPDIFF(second, :starttime, :endtime) as SingleCarrier_rate,
		doublecarrier_count*3600/TIMESTAMPDIFF(second, :starttime, :endtime) as DoubleCarrier_rate
				
	FROM
        
		(Select
		  COUNT(*) AS Total_count,
		  SUM(alltable.ParcelHistory_TupelLength = 1) AS singlecarrier_count,
 		  SUM(alltable.ParcelHistory_TupelLength = 2) AS doublecarrier_count, 
			        
        	FROM_UNIXTIME(CEIL(UNIX_TIMESTAMP(alltable.t_stamp) / 60) * 60) roundtime
        
		FROM alltable
		Where (alltable.t_stamp BETWEEN :starttime AND :endtime) and ('Induct 1' = :Induct)
	
		Group BY FROM_UNIXTIME(CEIL(UNIX_TIMESTAMP(alltable.t_stamp) / 60) * 60)
		/***Order By alltable.t_stamp ASC ***/
		) okey