//昨天0点到今天0点
select * from tablename
where create_time>= trunc(SYSDATE-1)
and create_time <trunc(SYSDATE )
//昨天8点到今天8点
select * from tablename
where create_time> trunc(SYSDATE-1)+ 8/24
and create_time < trunc(SYSDATE) + 8/24
//昨天0点到今天0点
select * from tablename
where create_time>= trunc(SYSDATE-1)
and create_time <trunc(SYSDATE )
//昨天8点到今天8点
select * from tablename
where create_time> trunc(SYSDATE-1)+ 8/24
and create_time < trunc(SYSDATE) + 8/24