title: Difference between Sortby and orderby queries in Hive
body: <p>Hive <code>sort by</code> and <code>order by</code> commands are used to fetch data in sorted order.</p>
  <p>For Example:</p>
  <p>Sort by</p>
  <pre><code>hive&gt; SELECT  E.EMP_ID FROM Employee E SORT BY E.empid;
  </code></pre>
  <p>Order by</p>
  <pre><code>hive&gt; SELECT  E.EMP_ID FROM Employee E order BY E.empid;  
  </code></pre>
  <p>What is the difference between <code>sort by</code> and <code>order by</code> queries in Hive SQL?</p>