Skip to content

Incorrect SQL solution for Problem 1517 (Find Users With Valid E-Mails) #4493

Closed
@piyushlasane

Description

@piyushlasane

Hi,

The SQL solution for 1517. Find Users With Valid E-Mails is incorrect.

Problem:
The current query does not enforce case sensitivity for the domain "leetcode.com".

Correct SQL:

SELECT *
FROM Users
WHERE 
    mail REGEXP '^[a-zA-Z][a-zA-Z0-9_.-]*@leetcode\\.com$'
    AND BINARY mail LIKE '%@leetcode.com';

Activity

HARIHARANS24

HARIHARANS24 commented on Jun 15, 2025

@HARIHARANS24

SELECT *
FROM Users
WHERE
mail REGEXP '^[a-zA-Z][a-zA-Z0-9_.-]*@leetcode\.com$'
AND BINARY mail LIKE '%@leetcode.com';

added a commit that references this issue on Jun 15, 2025
40ca1e8
yanglbme

yanglbme commented on Jun 15, 2025

@yanglbme
Member

Hi @piyushlasane @HARIHARANS24

Thanks for your feedback. I've fixed the incorrect SQL solution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @yanglbme@piyushlasane@HARIHARANS24

      Issue actions

        Incorrect SQL solution for Problem 1517 (Find Users With Valid E-Mails) · Issue #4493 · doocs/leetcode