How to get data from 2 tables on monthly basis?

I want to get data from 2 tables on monthly basis. For date reference I am using another table that has two columns: s_date and e_date. s_date contains month and starting date like 01/10/2018 similarly e_date contains month and end date like 31/10/2018.

Query is given here like:
Select *
from product x
join
category y
on x.pkey = y.pkey
where effective_date >= (select start_Date
from table1
where year(s_date) = year(c_date) and month(s_date) = month(c_date) );
but it is not working. Can someone please give me a correct solution for this problem?
Thanks in advance.

Tagged:
Sign In or Register to comment.