rotation."startdate" AND (
output."startdate">=rotation."startdate" AND
output."startdate"=rotation."startdate"
)
)
OR
(
rotation."startdate"=rotation."enddate"
)
)
WHERE
rotation."runid"=$P{RUN_ID}
GROUP BY
rotation."cropnumber",
rotation."crop",
rotation."startdate",
rotation."enddate"
ORDER BY
rotation."cropnumber"]]>