title: Select top average from a table where the name of the object is in another table
body: <p>I have to get the average top rating of a beer.
  I need to get this information from two tables, one table containing the rating and the other containing the name of the beer as follows;</p>
  <p>The RB table contains people's assessments of beers: Systembolaget's article number (SYSNR), the person's name (NAME), and the rating (RATING).</p>
  <p>The other table is;
  Table B contains information on different types of beer: Systembolaget's article number (SYSNR), producer (BREWERY), name of the beer (BEER), country of origin (COUNTRY) and liter price (PRICE).</p>
  <p>With the following code I can get the top average rated beer;</p>
  <pre><code>select sysnr, avg(rating) as avg_rating from rb group by sysnr order by avg(rating) desc limit 1;
  </code></pre>
  <p>I try to combine it with the following code to get the name of the beer but I get this error:
  Error: sub-select returns 2 columns - expected 1</p>
  <pre><code> select beer from b where sysnr in(select sysnr, avg(rating) as
   avg_rating 
   from rb 
   group by sysnr 
   order by avg(rating) desc limit 1);
  </code></pre>