title: month wise headcount of the subcontractor for period Jan 14 to Dec 14
body: <p>I have a table SOW ,which has columns ASSOCIATE, SOW_START_DATE, SOW_END_DATE,in which i need to get the count of associate for a month for year 2014, for eg i have associate Minal whose sow_start_date is 1-01-2014 and sow_end_date is 1-04-2014 i want query where minal is available for Jan,Feb,march and April.
  i have tried this query but result is minal is available only for Jan month instead f Jan,Feb,march,April.</p>
  
  <pre><code>select year([SOW Start Date]) as [year], month([SOW Start Date]) as   [months], Associate
  from SOW
  where month([SOW Start Date]) in (MONTH([SOW Start Date]), MONTH([SOW End Date]))
  and month([SOW Start Date]) =2 and YEAR([SOW Start Date])=2014
  group by year([SOW Start Date]), month([SOW Start Date]),Associate 
  having count(*) &gt;= 1
  order by month([SOW Start Date])
  </code></pre>