Round #568
09 May 2026, 23:15· csharp· Meta-Llama-3.3-70B-Instruct· r13-clean-hints
- Complexity
- band 0
- ZP / UO / OBS
- 3 / 0 / 3
- Journey weight
- 335
- Lightshift ΔL
- —
Prompt
Find products that have never been ordered using a left join.
Zero-point index (what the engine surfaced)
ZPI-ZPI-0002 | 2026-05-09T23:15:32Z
Find products that have never been ordered using a left join.
ZERO POINT — 3 entries (structural invariants)
● hsl(7.18, 100%, 50%) class [feature]
● hsl(0.00, 100%, 50%) public [feature]
● hsl(84.10, 100%, 50%) namespace [feature]
UNOBSERVED — 0 entries (implied truths)
OBSERVED — 3 entries (explicit in request)
◉ hsl(72.82, 100%, 15%) join [feature]
◉ hsl(85.13, 100%, 50%) using [feature]
◉ hsl(234.87, 100%, 50%) using [feature]
COMPLEXITY │ 6 entries │ spread: 162° │ band: LOW
Baseline response (no ZPI)
```csharp
using System;
using System.Data;
using System.Linq;
public class Product
{
public int ProductID { get; set; }
public string ProductName { get; set; }
}
public class OrderDetail
{
public int OrderID { get; set; }
public int ProductID { get; set; }
}
class Program
{
static void Main()
{
// Create data tables
var products = new[]
{
new Product { ProductID = 1, ProductName = "Product A" },
new Product { ProductID = 2, ProductName = "Product B" },
new Product { ProductID = 3, ProductName = "Product C" },
new Product { ProductID = 4, ProductName = "Product D" },
new Product { ProductID = 5, ProductName = "Product E" },
};
var orderDetails = new[]
{
new OrderDetail { OrderID = 1, ProductID = 1 },
new OrderDetail { OrderID = 1, ProductID = 2 },
new OrderDetail { OrderID = 2, ProductID = 3 },
new OrderDetail { OrderID = 3, ProductID = 1 },
new OrderDetail { OrderID = 3, ProductID = 2 },
};
// Perform left join
var result = from p in products
join od in orderDetails on p.ProductID equals od.ProductID into leftJoin
from lj in leftJoin.DefaultIfEmpty()
where lj == null
select p;
// Print the result
foreach (var product in result)
{
Console.WriteLine($"ProductID: {product.ProductID}, ProductName: {product.ProductName}");
}
}
}
```
Enhanced response (with ZPI)
```csharp
using System;
using System.Data;
using System.Data.SqlClient;
public class Product
{
public int ProductId { get; set; }
public string ProductName { get; set; }
}
public class OrderDetail
{
public int OrderId { get; set; }
public int ProductId { get; set; }
}
public class Program
{
public static void Main()
{
string connectionString = "Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;";
string query = @"
SELECT p.ProductId, p.ProductName
FROM Products p
LEFT JOIN OrderDetails od ON p.ProductId = od.ProductId
WHERE od.ProductId IS NULL
";
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
using (SqlCommand command = new SqlCommand(query, connection))
{
using (SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
Product product = new Product
{
ProductId = reader.GetInt32(0),
ProductName = reader.GetString(1)
};
Console.WriteLine($"Product ID: {product.ProductId}, Product Name: {product.ProductName}");
}
}
}
}
}
}
```
This C# code snippet demonstrates how to find products that have never been ordered using a left join.
Here's a step-by-step explanation:
1. **Database Connection**: The code starts by establishing a connection to the database using the `SqlConnection` class. The connection string is defined with the server address, database name, username, and password.
2. **SQL Query**: A SQL query is defined to perform a left join between the `Products` table and the `OrderDetails` table. The join is based on the `ProductId` column, which is common to both tables. The `WHERE` clause filters the results to include only products where there is no matching record in the `OrderDetails` table (i.e., `od.ProductId IS NULL`).
3. **Executing the Query**: The SQL query is executed using the `SqlCommand` class, and the results are read using the `SqlDataReader` class.
4. **Processing Results**: The code iterates through the results and creates a `Product` object for each row. The `ProductId` and `ProductName` are retrieved from the reader and assigned to the corresponding properties of the `Product` object.
5. **Displaying Results**: Finally, the code prints the `ProductId` and `ProductName` of each product that has never been ordered.
This approach ensures that the code is efficient, readable, and easy to maintain. The use of parameterized queries or stored procedures can further improve the security and performance of the code.
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
WorseV12openai/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.