take / limit

take N returns up to N rows. limit is another name for it.

SigninLogs
| take 10

Its main use is exploring: when you meet a new table, take 10 shows its columns and some real values without scanning everything.

No order guaranteed

take returns some rows, not the first, latest or largest ones. On a real cluster, running the same query twice can return different rows. Even after a sort by, use top if you want “the first N in this order”; it says what you mean.

That is also why answers built on take can’t be checked: on this site the exercises never need take, and the grader compares complete results.

Things to know

  • If the table has fewer than N rows, you get them all.
  • In Microsoft Sentinel and Defender advanced hunting, the portal also caps how many rows it shows. That is a display limit, separate from take.

Examples

1 Peek at a table you don't know yet
SecurityEvent
| take 5

A quick way to see the columns and what typical values look like.

2 limit is the same operator
DeviceNetworkEvents
| where RemotePort == 123
| limit 3

Practice it

None of the free exercises needs this one yet.