Demography: Answers

Demography: Answer 1

Show, for everyone, how many brothers and sisters, he (she) has.

Links between tables

SQL query

The "brother or sister" gender will be determined by the "gender" attribute for individuals who act as siblings of the reference individual. We can see, in the result of the query, that the individual number 1 has two sisters (sex F) and that the individual number 7 has one brother (sex H) and one sister (sex F).

(Back to questions)

Demography: Answer 2

Display, for each individual, the name of his grandparents, on the father's side. 

Links between tables

SQL query

(Back to questions)

Demography: Answer 3

Show the mean age of women at the time of their marriage.

Links between tables

SQL query

(Back to questions)

Demography: Answer 4

Display the name of the children (and the number of individuals) whose parents do not have the same nationality.

Links between tables

SQL query

(Back to questions)

Demography: Answer 5

Display the families (name of the father and the name of the mother) who have more than 2 children.

Links between tables

SQL query

(Back to questions)

Demography: Answer 6

Display the rank (senior, second child)... of the individual with a number equal to 11.

Links between tables

SQL query

(Back to questions)