Logo Bases de données
Français     English

Applications of Databases to Humanities and Social Sciences

Introduction


Demography : Answer 1

Display, for each individual, how many brothers and sisters he(she) has.

Links between tables

SQL query

The kind " brother or sister " will be determined by the attribute "sex" for the individuals who play the role of brothers or sisters of the individual of reference.
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 a brother (sex H) and a sister (sex F).

(Back to questions)

Demography : Answer 2

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

Links between tables

SQL query

(Back to questions)

Demography : Answer 3

Display the average age of the women at the date of their marriage.

Links between tables

SQL query

(Back to questions)

Demography : Answer 4

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

Links between tables

SQL query

(Back to questions)

Demography : Answer 5

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

Links between tables

SQL query

(Back to questions)

Demography : Answer 6

Display the rank (elder, second child ...) of the individual whose number is equal to 11.

Links between tables

SQL query

(Back to questions)

 

©Marc Grange, February 2001 | Last update: February 5, 2013