Hi I have two table :
workorder table which has workorder number and installed date like
Wono installed date 5001019652-A 2018-11-09 5000867488-A 2019-01-04 5000767284-A 2019-02-14 5000767284-C 2019-04-01 5001024077-A 2018-11-19 5001334999-A 2019-03-15 5001072902-A 2018-12-05 5000903119-A 2018-12-21 5000626549-A 2018-12-17 5000853550-A 2018-12-12 5001037291-A 2019-02-18 5001019661-A 2018-12-06 5000844133-B 2018-10-29 5000862316-A 2019-03-13 5000902804-A 2019-02-04 5000869355-A 2019-02-22 5001099829-A 2019-07-08 5000535231-B 2018-11-15 5000933921-A 2018-11-27 5000933921-B 2018-11-27 5000414260-A 2019-01-10 5000556701-B 2019-03-14 5000880757-C 2019-03-14 5000844141-D 2018-11-15Another closedate table has close date
CloseDate NumberOfJobs 2019-01-25 2019-02-22 2019-03-29 2019-04-26 2019-05-31 2019-06-28 2019-07-26 2019-08-30 2019-09-27 2019-10-25 2019-11-29 Now i need the number of jobs in closedate table
For example :
total number of jobs installed <"2019-01-25" should be next to 2019-01-25 row.
total number of jobs installed >="2019-01-25" and < "2019-02-22" should go next to 2019-02-22
total number of jobs installed >="2019-02-22" and < "2019-03-29" should go next to 2019-03-29 and so on...
please help me to write the SP or function....