title: What is the purpose of Order By 1 in SQL select statement?
body: <p>I'm reading through some old code at work, and have noticed that there are several views with an <code>order by 1</code> clause.  What does this accomplish? </p>
  
  <p>Example:</p>
  
  <pre><code>Create view v_payment_summary AS
  SELECT A.PAYMENT_DATE,
         (SELECT SUM(paymentamount)
            FROM payment B
           WHERE PAYMENT_DATE = B.PAYMENT_DATE
             and SOME CONDITION) AS SUM_X,
         (SELECT SUM(paymentamount)
            FROM payment B
           WHERE PAYMENT_DATE = B.PAYMENT_DATE
             and SOME OTHER CONDITION) AS SUM_Y    
  FROM payment A    
  ORDER BY 1;
  </code></pre>