Jump to content
TNG Community
dmohn

Burial place Count report

Recommended Posts

dmohn

I am new at report building, and could use a bit of help for a simple report.  I want a report that will sort places in descending order by a count of the number of burial events associated.  The report length can be limited to the top 50 or 100 places.  This report could then be used as I prioritize the addition of Cemetery records.  If this type of simple report already exists, I apologize for not finding it.

Share this post


Link to post
Share on other sites
dmohn

After reviewing other posts here, I have come up with sql that will partially satisfy my need.  It is:

SQL: SELECT burialplace, count( * ) AS cnt FROM tng_people WHERE 1 and burialplace is not null GROUP BY burialplace order by cnt

However, it needs to be tweaked to sort in descending order on cnt rather than ascending.  And burialplace should only be selected if the textstring contains "cemetery" or "memorial" so that entries can be eliminated for burials in jist a city,county,state location.  Can a coding guru add these tweaks?

Share this post


Link to post
Share on other sites
Scott_Pryer

SELECT burialplace, count(burialplace) as Quan FROM `tng_people` where burialplace<>"" group by burialplace order by Quan DESC limit 50

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×