So maybe MORE THAN GENERAL if you can get the "week of the month" for a date using this:
(FLOOR ((DAYOFMONTH (given) - 1) / 7)) AS 'week_of_month'
which, I believe, gives the exact 0-week index of the week for a given date. then you can use the value to find any nth, as in:
WHERE (week_of_month) = n And day of the week = {day of the week}
You can also use the above to get the "last {day of the week}":
WHERE (week_of_month> = 4) and day of the week = {day of the week}
note that week_of_month can vary from 0 to 5 (for example, a 31-day month, the 1st of which falls on Saturday, will be the 31st of the 6th week (5 as an index based on 0)
hope this helps ...
OK, a little more ... you can define above as a function, as in:
CREATE FUNCTION WEEKOFMONTH(given date) RETURNS int DETERMINISTIC RETURN (FLOOR((DAYOFMONTH(given) - 1) / 7))
and add another function:
CREATE FUNCTION WEEKNAME(given date) RETURNS text CHARACTER SET utf8 COLLATE utf8_unicode_ci DETERMINISTIC RETURN (CONCAT(ELT(WEEKOFMONTH(given)+1,'1st ','2nd ','3rd ','4th/Last ','5th/Last '),DAYNAME(given)))
then you can just say something like
SELECT * FROM dataTable WHERE WEEKNAME(your_date_field) = "3rd Wednesday"
... I struggled with how 4th / 5th should be returned from WEEKDAY, and decided to add "/ Last" for both according to the theory that it is "good enough" if someone wants to check 4- e, 5th or Past. Using this, you can do:
SELECT * FROM dataTable WHERE WEEKNAME(your_date_field) LIKE "%Last%"