title: How to create a index for a ORDER BY?
body: <p>Here is my business report, and I only need to create a index for ORDER BY.
  However, the group by is based on the SUM of amount and cost from different table, so how can I create the index?</p>
  
  <pre><code>     SELECT 
       TECHNICAL.TEMPLOYEE_ID,CONSULTANT.EMP_NAME, 
       SUM(SERVICES_PERFORMED.SP_AMOUNT * SERVICE.SER_COST) AS TotalCost
  
       FROM SERVICES_PERFORMED,TECHNICAL,CONSULTANT,SERVICE
  
       WHERE TECHNICAL.TEMPLOYEE_ID = SERVICES_PERFORMED.TEMPLOYEE_ID AND
       TECHNICAL.TEMPLOYEE_ID = CONSULTANT.EMPLOYEE_ID AND
       SERVICES_PERFORMED.SERVICE_ID = SERVICE.SERVICE_ID
  
       GROUP BY TECHNICAL.TEMPLOYEE_ID,CONSULTANT.EMP_NAME
       ORDER BY TotalCost DESC;
  </code></pre>
  
  <p>And here is the query that I thought about:</p>
  
  <pre><code>CREATE INDEX TCINDX ON  SERVICES_PERFORMED,SERVICE(TotalCost);
  </code></pre>
  
  <p>But it is incorrect.</p>