···257257 repo_star_counts as (
258258 select
259259 s.repo_at,
260260- count(*) as star_count
260260+ count(*) as stars_gained_last_week
261261 from stars s
262262 join recent_starred_repos rsr on s.repo_at = rsr.repo_at
263263+ where s.created >= datetime('now', '-7 days')
263264 group by s.repo_at
264265 )
265266 select rsc.repo_at
266267 from repo_star_counts rsc
267267- order by rsc.star_count desc
268268+ order by rsc.stars_gained_last_week desc
268269 limit 8
269270 `
270271