diff --git a/services/statistics-service/cmd/backfill-last7/main.go b/services/statistics-service/cmd/backfill-last7/main.go index 784a9c6c..69d11e69 100644 --- a/services/statistics-service/cmd/backfill-last7/main.go +++ b/services/statistics-service/cmd/backfill-last7/main.go @@ -356,7 +356,7 @@ func rebuildRegistrations(ctx context.Context, db *sql.DB, state *rebuildState, func rebuildActive(ctx context.Context, db *sql.DB, state *rebuildState, app, startDay, endDay string) error { // 活跃的原始房间事件已经被实时消费进 stat_user_day_activity;离线回填只重刷该表的国家/区域快照,避免在大窗口内扫描房间流水。 rows, err := db.QueryContext(ctx, ` - SELECT stat_day, user_id, MIN(first_active_at_ms) + SELECT DATE_FORMAT(stat_day, '%Y-%m-%d'), user_id, MIN(first_active_at_ms) FROM stat_user_day_activity WHERE app_code = ? AND stat_day BETWEEN ? AND ? GROUP BY stat_day, user_id`,