title: Pivot Table with group by
body: <pre><code>select out.a,out.b from out
  pivot (count([event]) for [date] in ([Mon],[Tues])) as event_count
  group by out.a,out.b
  </code></pre>
  
  <p>while executing this query I am getting the following error:</p>
  
  <blockquote>
    <p>The multipart identifier out.a,out.b could not be bound</p>
  </blockquote>