select 
	to_char(min(time), 'YYYY-MM-DD') as time,
	avg(x_axis_angle) ,
	avg(y_axis_angle) ,
	avg(sensor_temperature) ,
	round((sensor_temperature / 2)) * 2
from zc
where pn = 2008050087 -- and time > now() - interval '24 hours'
group by
	to_char(time, 'YYYY-MM-DD'),
	round((sensor_temperature / 2)) * 2
order by time asc 

