title: Is there a KQL query to limit the number of sub results I get per a particular category?
body: <p>I’m trying to generate a query where I limit the number of sub results I get per a particular category, and could use some help on if there is a good function for this.</p>
  <p>Quick Example:</p>
  <pre><code>|     ID    |     Category    |     Value    |     A bunch of other important columns    |  
  |-----------|-----------------|--------------|-------------------------------------------|
  |     1     |     A           |     GUID     |                                           |   
  |     2     |     A           |     GUID     |                                           |   
  |     3     |     A           |     GUID     |                                           |   
  |     4     |     A           |     GUID     |                                           |   
  |     5     |     B           |     GUID     |                                           |   
  |     6     |     B           |     GUID     |                                           |   
  </code></pre>
  <p>I want to return only N GUIDs per category. (Largely because I’m hitting the 64MB Kusto query limits for some Categories that won’t be useful anyway)</p>
  <p>The Top-nested operator looks good at first, BUT I don’t want to do any aggregation, and it filters out other important columns. Per the note on the page, I can use Ignore=max(1) to remove the aggregation, then do some serializing of all my other columns to a certain value, then unpack after the filter. But that feels like I’m doing something very wrong.</p>
  <p>I've also tried something like:</p>
  <pre><code>| partition by Category ( top 3 by Value)
  </code></pre>
  <p>But it's limited to 64 partitions, and I need closer to 500.</p>
  <p>Any idea of a good pattern to do this?</p>