Level 0 · Your toolkit · Card 1 of 9 · by Kaushik Saha
Look at the data
Commands take · project · project-away · project-rename · distinct
What these commands do
| Command | What it does | Shape |
|---|---|---|
take | Shows a few rows, any rows: a quick look | T | take 10 |
project | Keeps only the columns you name, in that order | T | project Col1, Col2 |
project-away | Drops the columns you name and keeps the rest | T | project-away Col1 |
project-rename | Renames a column | T | project-rename NewName = OldName |
distinct | Lists each different value (or combination) once | T | distinct Col |
A query starts with a table name. Each | (a pipe) hands the rows to the next command, so a query reads top to
bottom, one step per line.
See them work
project keeps the columns you name, and take shows a few rows:
SigninLogs
| project TimeGenerated, UserPrincipalName, AppDisplayName, ResultType
| take 3
Result on the sample · 3 rows
| TimeGenerated | UserPrincipalName | AppDisplayName | ResultType |
|---|---|---|---|
| 2026-06-10 07:45:44 | raj.patel@contoso.com | Office 365 Exchange Online | 50126 |
| 2026-06-10 08:28:33 | mei.chen@contoso.com | My Apps | 0 |
| 2026-06-10 09:40:23 | omar.haddad@contoso.com | My Apps | 0 |
project-rename gives a column a shorter name, and distinct lists each value once:
SigninLogs
| project-rename App = AppDisplayName
| distinct App
Result on the sample · 7 rows
| App |
|---|
| Office 365 Exchange Online |
| My Apps |
| Office 365 SharePoint Online |
| Microsoft Teams |
| Azure Portal |
| Azure Storage |
| Microsoft Graph PowerShell |
Seven apps in the whole morning. distinct is the quickest way to learn what a column holds.
When a table has many columns and you want almost all of them, project-away drops the few you don't need:
SigninLogs
| project-away LocationDetails, AuthenticationDetails, CorrelationId
| take 10
Your turn
List every different country (Location) that someone signed in from.
Write it in the box below and check it. Then compare with one answer; others can be right too.
Show one answer
SigninLogs
| distinct Location
Result on the sample · 4 rows
| Location |
|---|
| DE |
| US |
| GB |
| NL |
Check your own query
Write your query for the task above and check it against the real schema.
All data on this page is sample data, made up for this course. The IP addresses come from ranges reserved for documentation, and the people and the company are fictional.
Card by Kaushik Saha. Every query checked with Microsoft.Azure.Kusto.Language 12.4.1 against schema bundle 2026.10.29; every result computed on the course's sample with Kusto-Loco 1.4.9, an open-source KQL engine (credits). The story's clock reads 12:00 UTC on 10 June 2026.