title: select clause with having max condition
body: <p>For my database table:</p>
  
  <pre><code>//table1
  name
  ---------
  john
  mary
  ali
  </code></pre>
  
  <p>in my table2</p>
  
  <pre><code>//table2
  title
  ---------
   test1
   test2
   test3
  </code></pre>
  
  <p>in my table3</p>
  
  <pre><code>//table3
  name      title
  -----------------
   john      test1
   john      test2
   john      test3
   mary      test2
  </code></pre>
  
  <p>So my question is to find the title that been joined by name for most many times.</p>
  
  <p>So my query is:</p>
  
  <pre><code>SELECT t2.title from table2 t2 inner join table3 t3 on
     t2.title = t3.title inner join table1 t1 on 
     t1.name = t3.name having max(....)
  </code></pre>
  
  <p>as i check for some websites. all they use for the having clause is for the numbers only, i can't find any example that suit for my question that need to count(*)</p>
  
  <p>expected output:</p>
  
  <pre><code>//result
  title
  ---------
  test2
  </code></pre>