select a.gmt_create ,sum(cur) from (select count(1) cu ,to_char(gmt_create::timestamp,‘YYYY-MM-dd’) as gmt_create from am_property_standing_book group by to_char(gmt_create::timestamp,‘YYYY-MM-dd’) ) a join (select count(1) cur,to_char(gmt_create::timestamp,‘YYYY-MM-dd’) as gmt_create from am_property_standing_book group by to_char(gmt_create::timestamp,‘YYYY-MM-dd’)) b on a.gmt_create >= b.gmt_create group by a.gmt_create order by a.gmt_create