Jump to content
TNG Community

How can I get the size of a tree in my tree report


Dave Short

Recommended Posts

I am trying to write a report which I will use to compare the trees on TNG with those on my my home database. My first attempt, which gives me most of the information I want is: "select gedcom,Treename,description,lastimportdate from tng_trees order by treename".

However, I also want to know the number of people in each tree, and this works: "select gedcom as Tree, count(gedcom) as people from tng_people group by gedcom".

But when I try to combine these statements, like: "select gedcom,Treename,description,lastimportdate, (count(gedcom) as people from tng_people where tng_people.gedcom=tng_trees.gedcom )   from tng_trees order by treename" I get something which times out before it can produce an answer.

Any ideas, please?

 

Link to comment
Share on other sites

Leif Sweden

Hi Dave,

I am not sure if I can help you but first some questions:

  • which version of TNG do you use?
  • how many trees do you have in your base?

You can get information about number of persons and other information per tree or all together inside TNG but I don´t know if that is what you are looking for. I have 13 trees at my site and I can do that inside TNG,

Leif

Link to comment
Share on other sites

Try this:

select t.gedcom, t.description, treename, lastimportdate, count(personid) as numpeople from tng_people p inner join tng_trees t on p.gedcom = t.gedcom group by t.gedcom;

 

Cheers 

GOGGS

Link to comment
Share on other sites

10 hours ago, Dave Short said:

I also want to know the number of people in each tree,

Does the TNG Info > Trees  (browsetrees.php) not provide the information you are looking for

Link to comment
Share on other sites

Leif: I am using TNG v14, and have 283 trees at the moment, with more to come.

Goggs: Yes, that does the trick! Thanks very much.

Ken: Yes, but I want to download it in a file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...