title: Writing a Mathematical Formula when grouping table in SQL Azure "Import data"
body: <p>This query is working fine </p>
  
  <pre><code>select OrderForSeries.memberid, 
         Orderforseries.seriesid  ,
         log(count(orderforcontent.id)) as rating,
         Series.Mainauthorid, 
         series.Likecount, 
         series.viewcount
   from series join  OrderForSeries on OrderForSeries.SeriesId=Series.id
   join orderforcontent on orderforcontent.OrderForSeriesid=OrderForSeries.id
   group by  OrderForSeries.memberid, orderforseries.seriesid  ,
        Series.Mainauthorid, series.Likecount, series.viewcount 
   order by OrderForSeries.seriesid
  </code></pre>
  
  <p>but when I change <strong>"series.viewcount"</strong> in third row  to <strong>log(series.viewcount)</strong> I got error. I consider that this because of GRUOP by query. How can I use log function here?</p>
  
  <p>I am using Microsoft Azure 'import data'
  But When I use Visual studio it works fine </p>
  
  <p><strong>And this is error</strong>:</p>
  
  <pre><code>requestId = 96da06356e5d42b6bf5aede3170f718f errorComponent=Module.
  taskStatusCode=400. 
  {"Exception":
      { "ErrorId":"InvalidSQLScript",
        "ErrorCode":"0069",
        "ExceptionType":"ModuleException",
        "Message":"Error 0069: SQL query \" 
          select top 75000
            OrderForSeries.memberid, 
            Orderforseries.seriesid ,
            log(count(orderforcontent.id)) as rating,
            Series.Mainauthorid, 
            series.Likecount,
            log(series.viewcount)
          from series 
          join OrderForSeries on OrderForSeries.SeriesId=Series.id
          join orderforcontent on orderforcontent.OrderForSeriesid=OrderForSeries.id
          group by OrderForSeries.memberid, orderforseries.seriesid ,
            Series.Mainauthorid, series.Likecount, series.viewcount
          order by OrderForSeries.seriesid
      " is not correct:
      ??? ?? ??? ??? ??????.
      Please double check your query against your database."
      }
  }
  Error: Error 0069: 
    SQL query " .... " is not correct:
    ??? ?? ??? ??? ??????.
    Please double check your query against your database. 
  Process exited with error code -2 
  </code></pre>