title: MySQL Union?? Query Help
body: <p>I have two tables. One has album information, and the other is actual copies of those albums in the inventory.  These have different prices based on various factors.  Each row in the inventory table doesn't store the album information directly, just the id of the album in the "albums" table.</p>
  
  <p>The query I want to write will get me the Artist name, Album Name, image, etc from the albums table as well as the highest and lowest prices found in the inventory table.</p>
  
  <p>I know basic MySQL but I'm having a lot of trouble with this one.  Can some expert please help me here?  Thanks a lot!</p>
  
  <p>Albums table:</p>
  
  <ul>
  <li>id (pk)</li>
  <li>title</li>
  <li>artist</li>
  <li>year</li>
  <li>genre</li>
  </ul>
  
  <p>Inventory table:</p>
  
  <ul>
  <li>id(pk)</li>
  <li>albumId (corresponds to an id in albums table)</li>
  <li>price</li>
  <li>condition</li>
  <li>mono</li>
  </ul>
  
  <p>The query I've attempted looks like this but is giving me an error:</p>
  
  <pre><code>SELECT albums.artist, albums.title, albums.imgurl, albums.id
    FROM albums
  
  UNION 
  
  SELECT max(inventory.price), min(inventory.price)
   WHERE albums.id = inventory.albumId 
   LIMIT 30
  
  SELECT * FROM `albums`
  </code></pre>