select
-- validate as a real date with sqlite's date() function
date(
-- get '2022-09-06' from 'https://www.washingtonpost.com/national-security/2022/09/06/trump-nuclear-documents/'
printf('%s-%s-%s',
path_at(url_path(url), 1),
path_at(url_path(url), 2),
path_at(url_path(url), 3)
)
) as date,
count(*)
from washingtonpost_links
-- filter out invalid dates
where date is not null
group by 1
order by 1;