title: Combine columns from different tables with condition and AVG
body: <p>I'm practicing with SQL and I'm trying to achieve a query that came in my mind today.
  I have three tables:</p>
  
  <pre><code>AUTHORS
  AU_ID  NAME  LASTNAME  PHONE  ADDRESS  CITY  STATE  ZIP  CONTRACT
  
  TITLES
  TIT_ID  TITLE  TYPE  PUB_ID  PRICE  ADVANCE  ROYALTY  ...
  
  TITLEAUTHOR
  AU_ID  TIT_ID  AU_ORD  ROYALTYPER
  </code></pre>
  
  <p>What I want is to extract unique names and lastnames of authors and their respective AVG (average) price of books.</p>
  
  <p>I tried a lot of stuff but I'm not able to achieve this.</p>
  
  <p>Something that works, for now, is:</p>
  
  <pre><code>SELECT AVG(titles.price) FROM titles
  INNER JOIN titleauthor ON titles.tit_id = titleauthor.tit_id
  GROUP BY titleauthor.au_id
  </code></pre>
  
  <p>It gives me the AVeraGe price of authors books, but I don't know how to combine it with their names.</p>