<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Query Design on Xomaps Tech Blog</title><link>https://blog.xomaps.com/en/tags/query-design/</link><description>Recent content in Query Design on Xomaps Tech Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 28 Nov 2026 09:00:00 +0800</lastBuildDate><atom:link href="https://blog.xomaps.com/en/tags/query-design/index.xml" rel="self" type="application/rss+xml"/><item><title>A Complete Method Chain for Outdoor-Ad Spot Selection: Anti-Existence Scheduling Predicates, Grouped Quotas, and Two-Phase Greedy Selection</title><link>https://blog.xomaps.com/en/post/grouped-spot-selection/</link><pubDate>Sat, 28 Nov 2026 09:00:00 +0800</pubDate><guid>https://blog.xomaps.com/en/post/grouped-spot-selection/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;This is a retrieval-method note, scoped to selecting outdoor-advertising spots against a delivery date range. Method names and step numbers correspond to a working implementation; organization, customer, and deployment details are omitted. The subject is query semantics and execution strategy, not pricing, contracts, or scheduling rules.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;The conclusion first: &lt;strong&gt;generic paginated queries cannot express the semantics of spot selection; what is needed is a method chain of predicates, grouping, and packet-level strategy.&lt;/strong&gt; Three judgments up front: 1) availability is an anti-existence judgment over intervals, not a status-field filter, and it can be done entirely in database predicates without precomputing occupancy tables; 2) a group quota of 1 and a quota of N are two different execution paths, switched because window functions are incompatible with ORM tenant filters; 3) excluding spot packets must propagate at group granularity, since per-spot exclusion leaves the business gap of selling twice in the same elevator or unit.&lt;/p&gt;</description></item></channel></rss>