SELECT 
  	date(alltable.t_stamp) as Day,
	COUNT(*) AS Total,
 	SUM(alltable.DivertStatus = 5)/COUNT(*)*100 As Full,
  	SUM(alltable.ACTUAL_DEST = 'S0168')/COUNT(*)*100 AS Jackpot,
  	SUM(alltable.ACTUAL_DEST = 'S0199')/COUNT(*)*100 AS Recirc
FROM alltable
Where (alltable.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY day(alltable.t_stamp)