1import { fetchDeployStatsPerWindow } from '../../../pt0/deployF/testsF/fetchDeployStatsPerWindowAI.mts'3export const fetchGamesCountPerDeploy = (opts: { ep?: string; appConfig?: any }) =>5 ...opts,6 queryFnc: async (db, startTs, endTs) => {7 let q = db('dbgames').where({ is_finished: true }).where('created_at', '>=', startTs)8 if (endTs) q = q.where('created_at', '<', endTs)9 const [{ count }] = await q.count('* as count')10 return Number(count) || 011 },12 })