Here i am trying to all director name who directed comedy movie in leap year. I am getting wrong result and that may be because the way i am implementing leap year code is not right. Please help.
SELECT m.Title,p.Name,m.year
FROM Movie m JOIN
M_director d
ON m.MID = d.MID JOIN
Person p
ON d.PID = p.PID JOIN
M_Genre mg
ON m.MID = mg.MID JOIN
Genre g
ON g.GID = mg.GID
WHERE g.Name LIKE '%Comedy%' AND m.year%4 = 0 AND m.year % 100 <> 0 OR m.year % 400 = 0