Good night all! I sit programming all day. Now at night I think badly). The task means is this: a. get a list of marriages in which 2 children were born.
In the table of peoples data is stored about the parents. The marriages table stores data on contracted and terminated marriages. And in the last table, which concerns this task, children are kept. The structure is as follows:

I drew it in the ax, because the table Peoples for mother and father was duplicated. I am writing a request according to the task (Conclusion of marriages and the names of parents who had 2 children during the marriage):
SELECT m.ID_marriage, m.Date_begin_marriage, m.Date_end_marriage, a.Fam_people, a.Name_people, a.SecondName_people, b.Fam_people, b.Name_people, b.SecondName_people FROM Marriages AS m, Peoples AS a, Peoples AS b WHERE ((b.ID_people = m.Code_wife) AND (a.ID_people = m.Code_husband) AND 2 = (Select COUNT(*) FROM Childrens c WHERE ((c.Code_father = a.ID_people ) AND (c.Code_mother = b.ID_people) AND (c.Date_born > m.Date_begin_marriage) AND (c.Date_born < m.Date_begin_marriage)))); The request does not display anything. Although I had to bring one family, which was born in marriage 2nd. I forgot to write nested SQL queries, so I could be wrong. Who knows how to? I will be grateful.