sql statement for avg of post first day