# The Multivac — Evaluation Report

**Evaluation ID:** EVAL-20260402-131651
**Date:** Apr 02, 2026
**Category:** code
**Question ID:** CODE-013

---

## Question

This SQL query takes 45 seconds on a table with 10M rows. Rewrite it to run in under 1 second. Explain your optimization strategy.

```sql
SELECT u.name, u.email, 
       (SELECT COUNT(*) FROM orders o WHERE o.user_id = u.id) as order_count,
       (SELECT SUM(amount) FROM orders o WHERE o.user_id = u.id) as total_spent,
       (SELECT MAX(created_at) FROM orders o WHERE o.user_id = u.id) as last_order
FROM users u
WHERE u.created_at > '2024-01-01'
AND (SELECT COUNT(*) FROM orders o WHERE o.user_id = u.id) > 5
ORDER BY total_spent DESC
LIMIT 100;
```

Assume standard B-tree indexes on primary keys only. What indexes would you add?

---

## Winner

**Claude Opus 4.6** (openrouter)
- Winner Score: 9.29
- Matrix Average: 7.68
- Total Judgments: 54

---

## Rankings

| Rank | Model | Provider | Avg Score | Judgments |
|------|-------|----------|-----------|----------|
| 1 | Claude Opus 4.6 | openrouter | 9.29 | 7 |
| 2 | Claude Sonnet 4.6 | openrouter | 9.16 | 6 |
| 3 | GPT-5.4 | openrouter | 9.06 | 7 |
| 4 | GPT-OSS-120B | OpenAI | 8.82 | 6 |
| 5 | Gemini 3 Flash Preview | Google | 8.51 | 7 |
| 6 | MiMo-V2-Flash | Xiaomi | 8.45 | 7 |
| 7 | DeepSeek V4 | openrouter | 7.09 | 7 |
| 8 | Gemini 3.1 Pro | openrouter | 1.08 | 7 |

---

## 10×10 Judgment Matrix

Rows = Judge, Columns = Respondent. Self-judgments excluded (—).

| Judge ↓ / Resp → | GPT-5.4 | Gemini 3 | Claude Opus | Gemini 3.1 Pro | Claude Sonnet | MiniMax M2.5 | Grok 4.20 | GPT-OSS-120B | MiMo-V2-Flash | DeepSeek V4 |
|---|---|---|---|---|---|---|---|---|---|---|
| GPT-5.4 | — | 7.8 | 8.6 | 0.5 | 8.4 | · | · | 7.8 | 7.4 | 4.7 |
| Gemini 3 | 9.8 | — | 10.0 | 1.4 | 10.0 | · | · | 9.8 | 9.6 | 8.0 |
| Claude Opus | 9.6 | 8.6 | — | 1.0 | 9.2 | · | · | 9.2 | 8.9 | 6.5 |
| Gemini 3.1 Pro | 7.2 | 8.0 | 9.6 | — | 9.6 | · | · | 7.8 | 6.3 | 7.7 |
| Claude Sonnet | 9.3 | 8.8 | 9.6 | 1.0 | — | · | · | 9.6 | 9.2 | 7.2 |
| MiniMax M2.5 | 9.2 | 8.6 | 9.0 | 1.0 | 9.0 | — | · | 8.8 | 9.2 | 7.8 |
| Grok 4.20 | 9.0 | · | 9.0 | 0.2 | 8.8 | · | — | · | · | · |
| GPT-OSS-120B | · | 8.6 | · | · | · | · | · | — | 8.6 | · |
| MiMo-V2-Flash | 9.3 | 9.3 | 9.3 | 2.5 | · | · | · | · | — | 7.8 |
| DeepSeek V4 | · | · | · | · | · | · | · | · | · | — |

---

## Methodology

- **10×10 Blind Peer Matrix:** All models answer the same question, then all models judge all responses.
- **5 Criteria:** Correctness, completeness, clarity, depth, usefulness (each scored 1–10).
- **Self-judgments excluded:** Models do not judge their own responses.
- **Weighted Score:** Composite of all 5 criteria.

---

## Citation

The Multivac (2026). Blind Peer Evaluation: CODE-013. app.themultivac.com

## License

Open data. Free to use, share, and build upon. Please cite The Multivac when using this data.

Download raw JSON: https://app.themultivac.com/api/evaluations/EVAL-20260402-131651/results
Full dataset: https://app.themultivac.com/dashboard/export
