return out
+def count_age_at_child(newLine):
+
+ s = "select p1.bornYear - p2.bornYear as age, count(*)"\
+ +" FROM"\
+ +" parents INNER JOIN people p1"\
+ +" ON parents.ID = p1.ID"\
+ +" INNER JOIN people p2"\
+ +" ON parents.parentID = p2.ID"\
+ +" WHERE p1.bornYear <> 0 and p2.bornYear<>0"\
+ +" GROUP BY age;"
+
+ out = print_query(s,(),newLine)
+ return out
def all_ancestors(personID,newLine):
#find parents
./makeTables.py | sqlite3 tree.db
Deal with Consorts, this means including DATES OF MARRIAGE AND DIVORCE
+
+ELEANOR OF CASTILE has the WRONG PARENTS!!!!
#print o
-o = askQuestion.count_birth_month('\n')
-print o
+#o = askQuestion.count_birth_month('\n')
+#print o
-o = askQuestion.count_death_month('\n')
-print o
+#o = askQuestion.count_death_month('\n')
+#print o
#o = askQuestion.list_territories('\n')
#print o
-o = askQuestion.list_people('\n')
-print o
+#o = askQuestion.list_people('\n')
+#print o
+o = askQuestion.count_age_at_child('\n')
+print o
askQuestion.close(conn)