write query SQL.
schema:uapp_event_batch_log(device column name:umid,account column name:userid,date columns name:ds,is_new_install,event_name):       
data:event_name:$$_session_start
As a senior analyst, given the above schema and data, write a detailed and correct Postgres sql query to answer the analytical question:
"过去7天，每天活跃的账号数"
Rewrite the query here if there are any mistakes. If it looks good as it is, just reproduce the original query.
 Provide your response in exactly 5 paragraphs (separated nearby paragraphs with 3 aterisk symbols ***).
user