title: tsql query not working in mysql
body: <p>I currently have the following script working fine in TSQL:</p>
  
  <pre><code>select v.ratings as [Rating], COUNT(*) as 'total', 
      CAST(count(*)*100.0/tot as decimal(12,1)) as 'percent'
  from (select (case when Ratings = 5 then '5'
                  when Ratings = 6 then '6'
                  when Ratings = 7 then '7'
                  end) as Ratings,
                  COUNT(*) over (partition by NULL) as tot
              from vHighPerformance) v
  group by v.Ratings, v.tot
  </code></pre>
  
  <p>This same script does not work in MYSQL. It gives the following:
  <em>1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[Rating], COUNT(</em>) as 'total', CAST(count(*)<em>100.0/tot as decimal(12,1)) as '' at line 1</em></p>
  
  <p>Does anyone have any advice on translating this to mysql? As my research is falling short. thanks in advance.</p>