Markdown for LLMs
LDC-Q4011 — A question over a package needs conditions and a return list
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-Q4011 — A question over a package needs conditions and a return list
## What it means
A question over a package is only complete with both halves: the
conditions that filter the rows and the return list that says what to
give back for each row. A question with one half missing cannot run —
filtering without returning answers nothing, and returning without
filtering answers everything. The engine stops and asks for both halves.
Add the missing half. The half that is present stays as written.
## Example
```lawql
query q over "demo.diagnostics" { for x: Applicant; select resident(x); }
```
## Fix
```lawql
from r in rules select r
```
## Engine message
The engine reports this in its own wording:
```text
LDC-Q4011: query-over requires where …; and select …;.
```
## Related
- [Questions to the engine](/constructs/queries/) — the shape of a question over a package.
- [LDC-Q4001](/diagnostics/LDC-Q4001/) — the binders that come before both halves.