title: Count number of weekdays from the dates passed in where clause in DB2
body: <p>How to count the number of weekdays for a given date range passed in where clause. For example in the below example there are 13 records however only 9 of them fall under weekday. </p>
  
  <p><code>select * from table_name where startdate &gt; '2019-01-01' and enddate &lt; '2019-01-31'
  Date             Day          Asset Price
  01-01-2019      Tuesday      A        5
  01-01-2019      Tuesday      A        23
  02-01-2019      Wednesday    B        20
  03-01-2019      Thursday     C        87
  04-01-2019      Friday       D        34
  04-01-2019      Friday       D        8
  05-01-2019      Saturday     E        12
  05-01-2019      Saturday     E        56
  06-01-2019      Sunday       F       214
  07-01-2019      Monday       G        32
  08-01-2019      Tuesday      H        45
  09-01-2019      Wednesday    I        67</code></p>