select
count(*) as allBookCount,
count(*) filter(where createtime between (SELECT current_date - interval '30 day') and current_date ) as
last30DAddBookCount ,
count(*) filter(where createtime between (SELECT current_date - interval '7 day') and current_date) as
last7DAddBookCount ,
count(*) filter(where createtime between (SELECT current_date - interval '1 day') and current_date) as
yesterdayAddBookCount ,
count(*) filter(where createtime >=current_date ) as todayAddBookCount
from t_e_book