nadinemenezes 0 Report post Posted January 5 Hi all Can anyone please assist me with a report query that will show duplicate couple entries. There is a lot of endogamy in my tree and I would like to identify if the same couple has been entered more than once. Thanks in advance! Share this post Link to post Share on other sites
RickM 0 Report post Posted January 5 SELECT personID, lastname, firstname, birthdate, living, p.gedcom, et.tag AS Event, et.description, e.info FROM tng_people AS p LEFT JOIN tng_events AS e ON (e.persfamID=p.personID AND e.gedcom=p.gedcom) LEFT JOIN tng_eventtypes AS et ON e.eventtypeID=et.eventtypeID WHERE tag='EVEN' AND description='Spousename' GROUP BY personID, info HAVING COUNT(*)>1 ORDER BY lastname, firstname, birthdatetr; Not sure if this will give you what you want the description is as follows Wifes with duplicate marriage names (check for data plausibility) Vrouwen met een dubbele trouw naam. (Check naar de integriteit van de gegevens) This Query is from one of the reports in the Category:Henny Savenije - Reports on the TNG Wiki Share this post Link to post Share on other sites
nadinemenezes 0 Report post Posted January 5 Not sure what I am doing wrong but it is not working Share this post Link to post Share on other sites
RickM 0 Report post Posted January 5 Can you provide a screenshot of the error produced please Share this post Link to post Share on other sites
nadinemenezes 0 Report post Posted January 5 No error Just shows no data: http://www.ourfamilyfacts.com/showreport.php?reportID=4 Share this post Link to post Share on other sites
RickM 0 Report post Posted January 5 Have you made a change to the report?? If I run the report here I get headings 'LIVING' 'TREE' between 'BIRTHDATE' & 'EVENT' May I suggest also that you run the report from the Admin Reports Menu.. That way you can check the Query and if an error is produced get an idea of what that error is.. Share this post Link to post Share on other sites
nadinemenezes 0 Report post Posted January 7 Which parts of the query do I need to amend to suit my tree? I suspect thats why it is not working for me? I also dont know how to run it from admin to check for errors Share this post Link to post Share on other sites
RickM 0 Report post Posted January 8 You shouldn't 'need' to change the query to suit your 'Tree'. I do recall reading that different php versions treat sql queries slightly differently which meant the need to specify a tree, but cannot recall where I read that.. As for 'Running' a report from the admin screen.. Whilst in the Admin >> Reports screen you will see three boxes on the left of the inner screen.. the left most one is for 'Editing' the middle to 'Delete' and the right is to 'Test' the Report. Click on the Test box for the report you want to 'Run'.. Share this post Link to post Share on other sites
nadinemenezes 0 Report post Posted January 8 Thanks so much Rick, This is what I am seeing (see attached) Appreciate your help with this Share this post Link to post Share on other sites
RickM 0 Report post Posted January 8 Nadine, Everything seem to be correct in the running of that Query, so perhaps it is not quite the right query you need to show what you are wanting. Do you know of any 'couples'/families that have a duplicate entry and or any individuals that have a duplicate entry?? If so then obviously this query is not right for what you are asking, if not then unless someone else has used this query and had it find duplicate couples/families then I have exhausted the help I can provide.. I found this report here on the TNG WikiCategory:Henny Savenije - Reports You might find something better there. Share this post Link to post Share on other sites
nadinemenezes 0 Report post Posted January 8 Thanks so much for your help, i will have a look there! Share this post Link to post Share on other sites
RickM 0 Report post Posted January 8 I have no idea about SQL and creating reports, I remain however, at your service.. I will help with anything I can so please ask Share this post Link to post Share on other sites