[-] Error: expected 1 rank got 3
that seems weird SELECT COUNT(*) as count, date(timezone('UTC', purchase_time)) as day from purchase GROUP BY date(timezone('UTC', purchase_time)) ORDER BY day DESC LIMIT 15;
create index if not exists idx_purchase_purchase_time on purchase( date(timezone('UTC', purchase_time)) );
explain analyze SELECT COUNT(*) as count, date(timezone('UTC', purchase_time)) as day from purchase GROUP BY date(timezone('UTC', purchase_time)) ORDER BY day DESC LIMIT 15;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=1000.46..11744.04 rows=15 width=12) (actual time=1667.304..1700.836 rows=15 loops=1)
-> Finalize GroupAggregate (cost=1000.46..341213.86 rows=475 width=12) (actual time=1667.302..1700.832 rows=15 loops=1)
Group Key: (date(timezone('UTC'::text, purchase_time)))
-> Gather Merge (cost=1000.46..341201.99 rows=950 width=12) (actual time=1666.905..1700.817 rows=31 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Partial GroupAggregate (cost=0.43..340092.31 rows=475 width=12) (actual time=15.057..1098.931 rows=291 loops=3)
Group Key: date(timezone('UTC'::text, purchase_time))
-> Parallel Index Scan Backward using idx_purchase_purchase_time on purchase (cost=0.43..323734.62 rows=3270114 width=4) (actual time=0.029..975.622 rows=2609251 loops=3)
Planning Time: 0.235 ms
Execution Time: 1700.887 ms
src/game/client/components/
inside a new file, like how we added freezebars.cpp