1) How long have you studied at your school? For 9 years.
2) How long have you lived in this city/village? For 15 years.
3) How long have you know your best friend? For 9 years.
4) How long have you had your pet? For 3 years.
5) How long has your father known your mother? For 20 years.
6) How long has your family lived in your flat (house)? For 17 years.