BIOGRAPHY¶
Each row represents a chimpanzee and is a transformation of the
corresponding BIOGRAPHY_DATA row, making the data more like the
traditional format and therefore, in one sense, easier to work with. This view (like the underlying BIOGRAPHY_DATA
table itself) contains one row for each chimpanzee on which data has
ever been recorded (in SokweDB), and an additional row for UNK
a generic value used when a chimpanzee is unrecognized.
BIOGRAPHY contains the basic demographic data of
individual chimpanzees.
BIOGRAPHY is a simple view, consisting of a single table along with a few expressions which construct data to be presented in computed (virtual, in a sense) columns. In this spirit, here is a relatively simple query. (It does contain a computed column, and does use a computation to determine sort order.) It reports on males, sorting them first by whether or not they are alive, missing, known to be dead, etc., and within that by age, and within that by name.
SELECT biography.animid, biography.departtype, biography.animname
, biography.birthdate
, (biography.departdate - biography.birthdate) / 365.25
AS years_old
FROM biography
WHERE sex = 'M'
ORDER BY biography_data.departtype
, (biography.departdate - biography.birthdate)
, biography.animname;
Definition¶
CREATE OR REPLACE VIEW biography (
animid
,animidnum
,animname
,birthcomm
,bccertainty
,sex
,momid
,dadid
,dadidpub
,firstborn
,birthdate
,bdmin
,bdmax
,bddist
,entrydate
,entrytype
,departdate
,departtype)
AS
SELECT
biography_data.animid
,biography_data.animidnum
,biography_data.animname
,biography_data.birthcomm
,biography_data.bccertainty
,biography_data.sex
,biography_data.momid
,CASE
WHEN biography_data.dadstatus = 'Prelim'
THEN biography_data.dadid || '_prelim'
ELSE biography_data.dadid
END CASE
,biography_data.dadidpub
,biography_data.firstborn
,biography_data.birthdate
,biography_data.bdmin
,biography_data.bdmax
,biography_data.bddist
,biography_data.entrydate
,biography_data.entrytype
,biography_data.departdate
,biography_data.departtype
FROM biography_data;
Columns of the BIOGRAPHY View¶
Column |
From |
Description |
AnimID |
Animal IDentifier |
|
AnimIDNum |
Animal IDentifier Number |
|
AnimName |
Animal Name |
|
BirthComm |
Birth Community |
|
BCCertainty |
Certainty of BirthComm |
|
Sex |
Individual’s Sex |
|
MomID |
AnimID of the individual’s mother |
|
DadID |
AnimID of the individual’s father,
suffixed with |
|
DadIDPub |
Publication of Paternity citation |
|
FirstBorn |
First born status code |
|
BirthDate |
Birth Date |
|
BDMin |
Minimum Birth Date |
|
BDMax |
Maximum Birth Date |
|
BDDist |
Birth Date Distribution |
|
EntryDate |
Date of study Entry |
|
EntryType |
Entry status code |
|
DepartDate |
Date last seen |
|
DepartType |
Depart date status code |
Operations Allowed¶
None.
Page last generated: 2026-07-26 00:00:49 UTC