title: How can I get MIN, MAX, AVG working with an innerjoin?
body: <p>I need to get the Average, Minimum and Maximum for each industry type from a data set. When I use the MIN, MAX, AVG functions it just returns the same value as the Amount column.</p>
  
  <p><strong>My attempt</strong></p>
  
  <pre><code>SELECT c.Custid, c.Cname, c.City, c.IndustryType, o.OrderNo, o.OrderDate, o.SalesPersonID, o.Amount, 
  AVG(o.Amount) AS 'Average Amount',
  MIN(o.Amount) AS 'Minimum Amount',
  MAX(o.Amount) AS 'Maximum Amount'
  FROM customer c
  INNER JOIN orders o
  ON c.custid = o.custid
  GROUP BY c.IndustryType,o.orderdate;
  </code></pre>