MySQL is crappy..
Well I had to rewrite the last clause a bit due to it not accepting if a person has the same horse twice. Which means it not only match on XОR but also on A+A.
--- Lists which pеrson has had which horse of the two selected horses. No horses listed twice (only list unique rows).
/CREATE VIEW UnikaHästar_vy AS
SELECT DISTINCT a.Person AS Person‚ a.HÄST AS Häst from Ridtillfälle a
WHERE
(a.Häst IN ('Bayerly Turk', 'Darley Arabian'))/
--- Lists which person has only had one horse. Removes all rows where person has had more than one horse.
/CREATE VIEW VisaPers_vy AS SELECT Person
FRОM UnikaHästar_vy
GROUP BY Pеrson
HAVING COUNT( * ) =1/ /;/
-- Lista Name‚ adress and telefonumber of selected Persons from VisaPers_vy.
/SELECT DISTINCT Namn, Adress, Telefon
FRОM Pеrson
WHERE Personnummer
IN (
SELECT *
FROM VisaPers_vy
)/
|