title: Only one expression can be specified in the select list. in sql query
body: <p>this query works fine for me.</p>
  
  <pre><code>SELECT (SUM(AveragePrice)/COUNT(1)) AS AveragePrice, SUM(ItemsSold) AS ItemSold ,(SUM(AveragePrice * ItemsSold)) AS TotalSale FROM dbo.tbl_ProductSales
  WHERE ProductID IN ( SELECT ProductID FROM tbl_ProductPostions WHERE tbl_ProductPostions.SearchID=3 AND SaleDate='2012-02-02 00:00:00.000')
  GROUP BY SaleDate 
  </code></pre>
  
  <p>and resuts like this<br>
  AveragePrice  | ItemSold | TotalSale</p>
  
  <p>10            | 2        | 2000</p>
  
  <p>but when i embed this query  like this</p>
  
  <pre><code>SELECT * ,(SELECT (SUM(AveragePrice)/COUNT(1)) AS AveragePrice, SUM(ItemsSold) AS ItemSold ,(SUM(AveragePrice * ItemsSold)) AS TotalSale FROM dbo.tbl_ProductSales
  WHERE ProductID IN ( SELECT ProductID FROM tbl_ProductPostions WHERE tbl_ProductPostions.SearchID=tbl_SearchParameters.SearchID AND SaleDate='2012-02-02 00:00:00.000')
  GROUP BY SaleDate )
  FROM tbl_SearchParameters  
  </code></pre>
  
  <p>i got an error like this.
  Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.</p>
  
  <p>i know i  am crossing the limits but is there any alternate way to do this. 
  i know the function can be created to do this task. but is essential to create 
  three function separately to compute this these aggregate Average Price,Item Sold,Total Sale?
  while i am sure a single query can compute three aggregate for me ?
  can any body suggest me proper solution ? i just want to get ride of creating three functions separately for these aggregate respectively. 
  Regards.</p>