opraveno par drobnych chybicek. Predevsim, UNION v default nastaveni odmazava duplicity. Takze se musi pouzit UNION ALL. A zda se, ze to funguje :)
SELECT Articles.*
FROM Articles
WHERE
`Articles`.`IDArticle` IN
(
SELECT `IDArticle` FROM
(
(
SELECT `aa`.`ArtAid` AS `IDArticle`
FROM `ArtAut` `aa`
LEFT JOIN `Authors` `aut` ON `aut`.`IDAuthor` = `aa`.`AutAid`
WHERE
MATCH(`aut`.`secondname`) AGAINST('torok* urbanec* bakala* sramkova*' IN BOOLEAN MODE)
GROUP BY `aa`.`ArtAid`
HAVING COUNT(*) > 3
) UNION ALL (
SELECT `ArtSid` AS `IDArticle`
FROM `ArtStru`
LEFT JOIN (StruStru AS S1, StruStru AS S2) ON
(
(S1.referenceid=ArtStru.StruAid AND ( S1.referenceid=2)) OR
(S1.lowerid=ArtStru.StruAid AND ( S1.referenceid=2)) OR
(S1.lowerid=ArtStru.StruAid AND ( S2.higherid=2) AND S2.referenceid=S1.referenceid)
)
GROUP BY `ArtSid`
)
) AS `vyber`
GROUP BY `vyber`.`IDArticle`
HAVING COUNT(*) > 1
)
AND R06_title IS NOT NULL
AND publishdate>='2000-01-01' AND publishdate<='2015-12-31'
ORDER BY publishdate DESC