This document provides a developer's introduction to writing queries for Microsoft StreamInsight, an event processing engine. It outlines a 5-step process for developing StreamInsight queries: 1) model input and output events, 2) understand required query semantics by building sample tables, 3) gather query logic elements, 4) compose the query, and 5) specify timeliness of output. The document walks through a toll booth monitoring example, defining an input stream of vehicle passage events and a query to count vehicles every 3 minutes. Code examples and explanations demonstrate how to program a basic StreamInsight application.