I'm trying to limit the following query results to only the top 10 responses. So far the query does exactly what I want - namely it provides a list of the top systems, by count, ordered in descending order. I get all 31 responses, but I only want the top 10 responses. I've tried creating a While Do/End While loop, but I can't figure out exactly where to place it in the following code:

```
$sql = "
SELECT HelpDesk
     , COUNT(*) as NumSys 
  FROM `systems_17-18` 
 WHERE HelpDesk <>'' 
   AND HelpDesk <> 'NONE'    
 GROUP BY HelpDesk 
 ORDER 
    by NumSys DESC
";
$result = $conn->query($sql);
$mycount = 0;
if ($result->num_rows > 0) {
// output data of each row
echo "<table class='uk-table uk-table-condensed uk-table-hover uk-table-striped'>";        
while($row = $result->fetch_assoc()) 
{
$mycount ++;

echo "<tr>" ;
    echo "<td>";

    echo "<a href=" . $row['webaddress'] . " >";
    echo $row['SchoolDistrict'] . "</a>";
    echo "</td><td># " . $mycount . " " . $row['HelpDesk'] . " used by " .  $row[NumSys] . " district(s)";
echo "</td></tr>";
}

echo "</table>";
}

```

(NOTE: The code above correctly generates the data below. But how would I limit the list to only the top 10 responses? With a While EndWhile loop?)

School Districts in California that use Various Help Desk Systems:

```
 1 MyTechDesk used by 52 district(s)
 2 SchoolDude used by 40 district(s)
 3 WebHelpDesk used by 29 district(s)
 4 ZenDesk used by 15 district(s)
 5 SpiceWorks used by 14 district(s)
 6 KACE1000/2000 used by 13 district(s)
 7 FreshDesk used by 8 district(s)
 8 Track-IT! used by 6 district(s)
 9 Custom used by 6 district(s)
10 HEAT (Help Desk) used by 6 district(s)
11 SysAid used by 5 district(s)
12 ServiceDeskPlus used by 4 district(s)
13 GroupLink HelpDesk used by 4 district(s)
14 Altiris used by 4 district(s)
15 GLPI used by 3 district(s)
16 HESK used by 3 district(s)
17 HelpDesk used by 2 district(s)
18 Cherwell used by 2 district(s)
19 OPRAS used by 2 district(s)
20 Manage Engine Service Desk used by 2 district(s)
21 Samanage used by 1 district(s)
22 Absolute used by 1 district(s)
23 OTRS used by 1 district(s)
24 SherpaDesk used by 1 district(s)
25 Applied HelpDesk used by 1 district(s)
26 Public School Works used by 1 district(s)
27 iTop used by 1 district(s)
28 Connectwise used by 1 district(s)
29 Asana used by 1 district(s)
30 RT/SRTS used by 1 district(s)
31 OSTicket used by 1 district(s)

```