# Query Syntax

*noun*

say it: **“KWEER-ee SIN-taks”** **/ˈkwɪəri ˈsɪntæks/**

Writing a LINQ query with SQL-like keywords: from, where, orderby and select.

## What is **Query Syntax** in C#?

**Query Syntax** — Writing a LINQ query with keywords that read like SQL: `from`, `where`, `orderby`, `select`. The compiler turns it into the same method calls as method syntax, so pick whichever reads better.

```csharp
var cheap = from p in products
            where p.UnitPrice < 10m
            orderby p.ProductName
            select p.ProductName;
```

## In a sentence

- “In **query syntax**, the filter reads from p in products where p.UnitPrice &lt; 10 select p.”

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=3)

Updated: October 28, 2026

Source: https://www.ask-codey.com/glossary/query-syntax
