title: MySQL - Multiply columns by alias
body: <p>I am trying to get a number of images for an item group but cant seem to get the multiplication to work with the alias assigned. I have tried the script below with some modifications but every thing I have tried will not work.</p>
  
  <pre><code>SELECT s.pid AS 'ID', 
         CONCAT_WS(', ', p.lastname, p.firstname) AS 'Name', 
         CONCAT(s.date, ' ', s.time) AS Serviced, 
         p.institution AS Facility, 
         s.description AS 'description title', 
         (SELECT COUNT(*) 
            FROM series se 
           WHERE se.studyid = s.id) 
            AS numseries, 
         (SELECT COUNT(*) 
            FROM image i 
           WHERE i.seriesid = se.id) 
            AS serimages, 
         numseries * serimages AS 'Number of Images' 
    FROM product p, 
            series se 
         JOIN 
            study s 
         ON s.pid = p.id 
  GROUP BY s.id 
  ORDER BY Serviced DESC
  </code></pre>