soql query to get accounts created in last 7 days including today code example Example: soql last week Select * from case where WHERE CreatedDate = LAST_N_DAYS:30