Report: People buried before death

From TNG_Wiki
Jump to navigation Jump to search

Description: People buried before death (even though it MAY be possible, it's unlikely)


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, deathdate, deathdatetr, burialdate, burialdatetr, YEAR( burialdatetr ) - YEAR( deathdatetr ) AS difference FROM tng_people WHERE ( burialdatetr - deathdatetr <0 ) AND ( `burialdatetr` !=0000 -00 -00 OR YEAR( burialdatetr ) !=0000 ) AND birthdate != "" AND burialdate != "" AND `living` = "0" AND burialdate != "n" AND burialdatetr - deathdatetr !=0