Study workspace

Prepare for SC-200 with a reference that remembers your progress.

All nine learning paths now run in the new architecture. Select one to reveal its brief and modules.

09 / 09

Choose a learning path

0/404 units
04Create queries for Microsoft Sentinel using KQL4 modules · 29 units · Query construction, aggregation, visualization, multi-table analysis, parsing, and reusable functions0/29 units complete
Learning path 04 · Create queries for Microsoft Sentinel using KQL

4 modules · 29 units · Query construction, aggregation, visualization, multi-table analysis, parsing, and reusable functions

0%

Study focus

KQL foundations

Build statements with filtering, projection, aggregation, time operations, and visualization.

Investigation queries

Analyze multi-table data with joins, unions, parsing, reusable functions, and Sentinel security context.

4 modules · 29 units

Select one or more modules

Each click adds or removes a module from your workspace. Units remain closed until you open them.

01

Module 1

Construct KQL statements for Microsoft Sentinel

Focus: the tabular pipeline, broad searches, precise filters, variables, calculated columns, sorting, and output-column control.
0/10
01 / 10Introduction

Kusto Query Language (KQL) is the read-only query language behind Microsoft Sentinel logs, analytics rules, workbooks, and hunting. This module establishes the operators used to retrieve, filter, transform, sort, and shape security data.

Official moduleObjectives and prerequisites
02 / 10Understand the Kusto Query Language statement structure

A KQL query is a sequence of statements. A tabular expression begins with a data source and sends its rows through operators separated by the pipe character. Each operator receives the complete result produced on its left.

SecurityEvent
| where TimeGenerated > ago(1d)
| summarize Events = count() by Account
| top 10 by Events desc
Exam takeaway: operator order changes both meaning and performance. Think: source → filter → transform → aggregate → present.

The Microsoft Log Analytics demo environment can be used for practice; its data changes continuously, so widen the time range when a sample returns no rows.

Official lesson and demo linkKQL pipeline and Logs workspace
03 / 10Use the search operator

search looks for text across multiple tables and columns. It is useful during discovery when you do not yet know the schema, but it is less efficient than querying a known table and filtering a known column.

search "err"

search in (SecurityEvent, SecurityAlert, A*) "err"
Exam takeaway: use search to discover where data lives; switch to table-specific where filters for operational queries.
Official lessonCross-table text search
04 / 10Use the where operator

where returns only rows whose Boolean predicate is true. Filter time and high-selectivity fields early to reduce the amount of data processed by later operators.

SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID in (4624, 4625)
| where AccountType =~ "user"
  • == is case-sensitive; =~ is case-insensitive.
  • in (...) tests a value against a list.
  • Multiple where operators can make complex logic easier to read.
Official lessonPredicates, time filters, and lists
05 / 10Use the let statement

let binds a name to a scalar value, tabular expression, dynamic list, view, or function. It improves readability, reuse, and consistent thresholds. Each declaration ends with a semicolon.

let timeframe = 7d;
let suspiciousEvents = dynamic([4625, 4672]);
SecurityEvent
| where TimeGenerated > ago(timeframe)
| where EventID in (suspiciousEvents)

A tabular expression can also be assigned to a name and referenced later as if it were a table. ago() calculates a time relative to the query execution time.

Official lessonVariables, lists, tables, and reuse
06 / 10Use the extend operator

extend calculates one or more columns and appends them to the current result. Existing columns remain unless they are later removed with a project operator.

SecurityEvent
| where ProcessName != "" and Process != ""
| extend StartDir = substring(
    ProcessName, 0,
    string_size(ProcessName) - string_size(Process))

Use it to normalize fields, convert data types, calculate risk flags, or derive fields needed for grouping and correlation.

Official lessonCalculated columns
07 / 10Use the order by operator

order by (or sort by) sorts the result by one or more columns. The default direction is descending; specify asc or desc explicitly for clarity.

SecurityEvent
| order by TimeGenerated desc, Computer asc

Sorting can be expensive on large datasets, so filter and project before ordering whenever possible.

Official lessonSingle- and multi-column sorting
08 / 10Use the project operators
OperatorPurpose
projectSelect, rename, or calculate the output columns.
project-awayRemove specified columns.
project-keepKeep only specified columns.
project-renameRename columns without dropping the rest.
project-reorderSet the visible column order.
SecurityEvent
| where EventID == 4625
| project TimeGenerated, Computer,
          User = Account, IpAddress
Exam takeaway: extend adds calculated columns; project defines the final schema and can improve performance by reducing width.
Official lessonOutput column selection and naming
09 / 10Module assessment

Be ready to select the correct operator: search for unknown locations, where for row filtering, let for reusable expressions, extend for calculated columns, order by for sorting, and project for output shape.

Official assessmentKQL construction knowledge check
10 / 10Summary and resources

Build readable queries from left to right, apply selective filters early, name reusable logic, derive only necessary fields, and finish with a narrow result schema.

Official moduleSummary and resources
End of learning pathCreate queries for Microsoft Sentinel using KQL