placing SQL order by (simple) : <p>I'm trying to order the following results on reference. Using Order by and desc limit 100. Can someone help me where to place it.   </p>

<pre><code>$stm = $pdo-&gt;prepare("SELECT `reference`, SUM( `stockdifference` ) AS 'stockdifference'  
FROM `results1` 
WHERE `datum` BETWEEN '".$oldDate."' AND '".$newDate."' AND `reference` = '".$stm[0]."'");
</code></pre>
