This is an example,Im trying combine two tables here which are db_match and country as you can see but I need to extract just month from the whole date so what could I try here ?
I tried,
update db_match set date=str_to_date(date,"%Y/%m/%d %h:%i:%s");
here's the join query:
select db_match.date,country.name,country.id
from db_match(
select EXTRACT (MONTH FROM date) as Themonth
)sub
inner join country
on country.id=db_match.country_id
group by Themonth
order by id;