function getActiveEventStats
getActiveEventStats(events: EventWithCount[]): Promise<ActiveEventStats>

Get aggregated statistics for active events. Filters active events from the provided list, computes attendees (sum of quantities) from cached EventWithCount data, and queries ticket count (rows) and income (sum of decrypted price_paid).

Parameters

events: EventWithCount[]

Return Type

Usage

import { getActiveEventStats } from "docs/database.ts";