Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-23-2022 03:30 PM
I'm having trouble with translating this query
SELECT [EmailAddress], [CustomerName] FROM [Customers] WHERE [EmailAddress] IN
(SELECT [EmailAddress] FROM [Customers] GROUP BY [EmailAddress] HAVING COUNT(*) > 1)
05-23-2022 03:58 PM
The sql query is finding the email addresses and corresponding customers for emails that are used by more than one customer.
What is your neo4j data model? Are you storing the email address as a property of a Customer node? The query to achieve what you want would not be very efficient with this model.
Considering you think an email can be used by multiple people, then each Customer linked to an Email node with the email address as a property would make finding those customers very easy.
All the sessions of the conference are now available online