I have this table structure:
CREATE TABLE IF NOT EXISTS `person` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`father` text NOT NULL,
`mother` text NOT NULL,
`name` text NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
and the data:
(`ID`, `father`, `mother`, `name`)
( 1 '' '' 'Robert Darwin'),
( 2 '' '' 'Josiah Wedgwood'),
( 3 '' '' 'Sarah Wedgwood'),
( 4 '' '' 'Mary Howard'),
( 5 1 '' 'Erasmus Darwin'),
( 6 '' '' 'Elizabeth Allen'),
( 7 2 3 'Josiah II'),
( 8 2 3 'Susannah Wedgwood'),
( 9 5 4 'Robert Waring Darwin'),
( 10 7 6 'Josiah III'),
( 11 7 6 'Emma Wedgwood'),
( 12 9 8 'Charles Robert'),
( 13 9 8 'Caroline Sarah Darwin'),
( 14 10 13 'Margaret Wedgwood'),
( 15 11 12 'William Erasmus');
What I need is to gather the list of persons whose SPOUSE is also their FIRST-DEGREE COUSIN?
Can anyone help me with how to formulate the MySQL query?