How to show the Trends shiftwise using Radio Button?

Hi, I am very much confused with this. As I said, I made three radio buttons ‘Shift 1’, ‘Shift 2’ and ‘Shift 3’. Then I made the following SQL Queries.

For the button Shift 1

select * from ht_cm1 where date_format(curdate(),’%d-%m-%Y’)=date_format(t_stamp,’%d-%m-%Y’)

and date_format(t_stamp,’%T’)<‘08:00:00’

For the button Shift 2

select * from ht_cm1 where date_format(curdate(),’%d-%m-%Y’)=date_format(t_stamp,’%d-%m-%Y’)

and date_format(t_stamp,’%T’)>‘08:00:00’ and date_format(t_stamp,’%T’)<‘16:00:00’

For the button Shift 3

select * from ht_cm1 where date_format(curdate(),’%d-%m-%Y’)=date_format(t_stamp,’%d-%m-%Y’)

and date_format(t_stamp,’%T’)>‘16:00:00’

But I am not sure about the correctness of these queries. Also, how to bind these to an Easy Chart?