Round #789
10 May 2026, 17:53· csharp· Meta-Llama-3.3-70B-Instruct· r14-length-bound
- Complexity
- band 1
- ZP / UO / OBS
- 6 / 4 / 1
- Journey weight
- 602
- Lightshift ΔL
- —
Prompt
Write a SQL query that returns customers with more than 3 orders.
Zero-point index (what the engine surfaced)
ZPI-ZPI-0006 | 2026-05-10T17:53:35Z
Write a SQL query that returns customers with more than 3 orders.
ZERO POINT — 6 entries (structural invariants)
● hsl(27.69, 100%, 50%) async [feature]
● hsl(145.64, 100%, 50%) Task of T [feature]
● hsl(348.72, 100%, 36%) IDisposable [feature]
● hsl(7.18, 100%, 50%) class [feature]
● hsl(0.00, 100%, 50%) public [feature]
● hsl(84.10, 100%, 50%) namespace [feature]
UNOBSERVED — 4 entries (implied truths)
○ hsl(9.23, 100%, 50%) interface [feature]
○ hsl(180.92, 100%, 28%) Database health check [function]
○ hsl(144.00, 100%, 42%) Connection resilience [function]
○ hsl(83.08, 100%, 42%) ILogger of T injection [function]
OBSERVED — 1 entries (explicit in request)
◉ hsl(98.46, 100%, 50%) with [feature]
COMPLEXITY │ 11 entries │ spread: 172° │ band: MEDIUM
Baseline response (no ZPI)
**SQL Query: Customers with More Than 3 Orders**
```sql
SELECT c.*
FROM Customers c
JOIN (
SELECT CustomerID, COUNT(OrderID) as OrderCount
FROM Orders
GROUP BY CustomerID
HAVING COUNT(OrderID) > 3
) o ON c.CustomerID = o.CustomerID;
```
**Explanation:**
1. We use a subquery to count the number of orders for each customer.
2. We group the orders by `CustomerID` and use the `HAVING` clause to filter customers with more than 3 orders.
3. We join the `Customers` table with the subquery result on the `CustomerID` column.
4. We select all columns (`*`) from the `Customers` table for the filtered customers.
**Assumptions:**
* `Customers` table has a column named `CustomerID`.
* `Orders` table has columns named `OrderID` and `CustomerID`.
* The database management system supports subqueries and joins.
**Example Use Case:**
Suppose we have the following tables:
`Customers` table:
| CustomerID | Name | Email |
| --- | --- | --- |
| 1 | John Doe | johndoe@example.com |
| 2 | Jane Doe | janedoe@example.com |
| 3 | Bob Smith | bobsmith@example.com |
`Orders` table:
| OrderID | CustomerID | OrderDate |
| --- | --- | --- |
| 1 | 1 | 2022-01-01 |
| 2 | 1 | 2022-01-15 |
| 3 | 1 | 2022-02-01 |
| 4 | 1 | 2022-03-01 |
| 5 | 2 | 2022-01-01 |
| 6 | 2 | 2022-02-01 |
| 7 | 3 | 2022-01-01 |
| 8 | 3 | 2022-02-01 |
| 9 | 3 | 2022-03-01 |
| 10 | 3 | 2022-04-01 |
| 11 | 3 | 2022-05-01 |
Running the query will return:
| CustomerID | Name | Email |
| --- | --- | --- |
| 1 | John Doe | johndoe@example.com |
| 3 | Bob Smith | bobsmith@example.com |
These are the customers with more than 3 orders.
Enhanced response (with ZPI)
```csharp
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using Microsoft.Extensions.Logging;
public class CustomerOrderQuery
{
private readonly ILogger<CustomerOrderQuery> _logger;
private readonly DbContext _context;
public CustomerOrderQuery(ILogger<CustomerOrderQuery> logger, DbContext context)
{
_logger = logger;
_context = context;
}
public async Task<IEnumerable<Customer>> GetCustomersWithMoreThanThreeOrdersAsync()
{
try
{
var customers = await _context.Customers
.Include(c => c.Orders)
.Where(c => c.Orders.Count > 3)
.ToListAsync();
return customers;
}
catch (Exception ex)
{
_logger.LogError(ex, "Error retrieving customers with more than three orders");
throw;
}
}
}
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public ICollection<Order> Orders { get; set; }
}
public class Order
{
public int Id { get; set; }
public int CustomerId { get; set; }
public Customer Customer { get; set; }
}
```
The equivalent SQL query would be:
```sql
SELECT c.*
FROM Customers c
JOIN (
SELECT CustomerId, COUNT(*) as OrderCount
FROM Orders
GROUP BY CustomerId
HAVING COUNT(*) > 3
) o ON c.Id = o.CustomerId;
```
Grader chain
Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.
V1samba/Meta-Llama-3.3-70B-Instruct
BetterV4qwen2.5-coder-3b-instruct
BetterV5openrouter/qwen/qwen3-235b-a22b-2507
BetterV7qwen2.5-coder-7b-instruct
BetterV8openai/gpt-4.1
BetterV9anthropic/claude-opus-4-7
BetterV12openai/gpt-4o
BetterComments
Our grader said what it said. What do you say? Comment as a guest below.
No comments yet. Be the first to say what you make of this round.