© 2026 Hedgehog Software, LLC
count()
countDistinct()
astro:db
const viewsQuery = db .select({ url: PageView.url, pageviews: count(), }) .from(PageView) .where(and(...conditions)) .limit(pageSize) .offset(offset) .groupBy(PageView.url) .orderBy(desc(count()));