Report: Born after Baptized

From TNG_Wiki
Jump to navigation Jump to search

Description: Persons who are born after they are baptized

Copy and paste the text between the lines into the reports section below "OR Leave Display, Criteria and Sort fields blank and enter direct SQL SELECT statement here:" and give it the title you think is appropriate

SELECT personID, firstname, lastname, birthdate, birthdatetr, altbirthdate, altbirthdatetr, 
YEAR( altbirthdatetr ) - YEAR( birthdatetr ) AS Age FROM tng_people 
WHERE ( altbirthdatetr - birthdatetr <0 ) AND ( `birthdatetr` !=0000 -00 -00 
OR YEAR( altbirthdatetr ) !=0000 ) AND birthdate != "" AND altbirthdate != "" AND `living` = "0" 
AND altbirthdate != "n" AND altbirthdatetr - birthdatetr !=0