Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage case where lastName is one character and firstName is multiple characters #529

Open
paulalbert1 opened this issue Apr 17, 2024 · 0 comments

Comments

@paulalbert1
Copy link
Contributor

This occurs at least ~0.03% of the time, probably more as unlikely records are discarded.

See query:


SELECT * from (
SELECT 
  a.pmid, 
  a1.personIdentifier,
  userAssertion,
  GROUP_CONCAT(distinct authorLastName SEPARATOR ', ') AS lastName, 
  GROUP_CONCAT(distinct authorFirstName SEPARATOR ', ') AS firstName
FROM 
  person_article a1
JOIN
  person_article_author a on a1.pmid = a.pmid and a1.personIdentifier = a.personIdentifier
WHERE 
  CHAR_LENGTH(authorLastName) = 1 AND 
  CHAR_LENGTH(authorFirstName) > 1
GROUP BY  
  a.pmid
) x where lastName like '%,%'

990d34ae-eb42-4ef8-be5b-5f8851dbe932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant