sql - List all championships that were in progress in a month/year -


i'm trying solve select statement. problem list championships in progress in month , year.

for exemple, wanna list

all championships in progress in march, 2005.

i have columns:

table: championships (id_champ, name, startdate, enddate).

how can list championships in progress in march, 2005?

i'm trying this:

select * championships  (month(startdate) <= 3  , year(startdate)<=2005)  , (month(startdate)<=3 , year(enddate)<=2005 

anyone here knows correct way or best way solve it?

to catch active in march 2005:

select * championships year(enddate) = 2005 , 3 between month(startdate) , month(enddate). 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -