title: a query from SQL/92 doesn't work in later versions
body: <p>I have a sql query like this:</p>
  
  <pre><code>select tt.product_name, tt.countt
  from (select ofr.product_name as product_name, count(*) as countt
  from offers ofr
  group by ofr.product_name) as tt
  where 12 = (select max(tt.countt) from tt);
  </code></pre>
  
  <p>my problem is in the last line: the sql doesn't recognize table tt!</p>
  
  <p>As I know in SQL/92 this usage of tables works.
  But I don't know what alternative should I use in the later versions.</p>
  
  <p>I'm using this version of MY-SQL:</p>
  
  <p>mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper</p>
  
  <p>UPDATE:
  I want the row in tt which it's "countt" is maximum amoung all rows in tt. The number "12" was an example, because based on the data in my dabase the max value of "count" column will be 12</p>