Report: individuals: farmers - with farmer's names, ordered by farmer's name

From TNG_Wiki
Jump to navigation Jump to search

Description: individuals: farmers - with farmer's names, ordered by farmer's name. You can change the names of the profession to anything you like. In this case a description like "became first farmer and bought ...." will also be selected as well as "agricultural consultant"

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 info AS description_of_the_occupation, eventdate AS Dates, eventplace AS place_of_the_occupation, agency AS position, p.personID, lastname, firstname, birthdate, p.living, p.gedcom FROM tng_events AS e INNER JOIN tng_eventtypes AS et ON e.eventtypeID = et.eventtypeID INNER JOIN tng_people AS p ON ( e.persfamID = p.personID AND e.gedcom = p.gedcom ) WHERE et.tag = "OCCU" AND ( info LIKE "%famer%" OR info LIKE "%agricult%" ) ORDER BY lastname, firstname, p.personID, info;