How to get ROW_NUMBER() in SQL?
<p>I tried to get the row number using <code>ROW_NUMBER()</code> but it shows the following error:</p>

<blockquote>
  <p>can't format message 13:896 -- message file C:\WINDOWS\firebird.msg
  not found. Dynamic SQL Error. SQL error code = -104. Token unknown -
  line 2, column 66.</p>
</blockquote>

<p>Here is my code:</p>

<pre><code>SELECT  avg(CSIDTL.RATING) ,SVD.SVCADVISORNAME, ROW_NUMBER() OVER(ORDER BY avg(CSIDTL.RATING) )
        FROM T_APPT_BOOKING_MSTR MSTR ,T_APPT_CSI_SURVEY CSI,T_APPT_CSI_SURVEY_DTL CSIDTL,
        T_SVC_SVCADVISOR_MASTER SVD
        WHERE MSTR.APPTBKID = CSI.APPTBKID
        AND CSI.CSI_SURVERYID = CSIDTL.CSI_SURVERYID
        AND SVD.SVCADVISORID = MSTR.SVCADVISORID
        AND CSI.FEEDBACK_STATUS = 'Y'
        AND CSIDTL.question ='Service Advisor'
        GROUP BY SVD.SVCADVISORNAME
        ORDER by avg(CSIDTL.RATING)
</code></pre>