i have a table1 which contains the name of fruits and received date and qty
and in one table2 the cost of each fruit when ever it changes based on date that from date to till date

the problem is how to see get the report of previous month based on fruits cost for that month

ex: 1 apple cost for date from 10th oct to 15th oct was $ 10 and now from 16th oct to 27 nov its $15

how to connect query so that it gives the cost of apples as per date to date