NO REGEX FUNCTIONS 
Intuition1st part consists of:
....................................... lowercase letters : a-z
....................................... uppercase letters : A-Z
.
# Intuition

1st part consists of:
....................................... lowercase letters : a-z 
....................................... uppercase letters : A-Z
....................................... digits : 0-9
....................................... underscore : _

2nd part is : @ 

3rd part consists of :
....................................... lowercase letters : a-z 
....................................... uppercase letters : A-Z

4th part is : .com
# Approach
1- check that only 1 '@' exists
2- check that it ends with '.com'
3- check that the 1st part is not anything but a letter, number or underscore
4- check that the 3rd part is not anything but letters

5- order/sort by the user_id

# Code

```MSSQL []
SELECT user_id , email
FROM Users
WHERE email LIKE '[a-zA-Z0-9_]%@[a-zA-Z]%.com' AND
      email NOT LIKE '%..%' AND 
      email NOT LIKE '%.%@%' AND
      email NOT LIKE '%@[a-zA-Z]%[0-9]%' 
ORDER BY user_id
```
```Python []
import pandas as pd

def find_valid_emails(users: pd.DataFrame) -> pd.DataFrame:

    def is_valid_email(email):
        if email.count("@") != 1: return False
        if not email.endswith(".com"):return False
        a , domain = email.split("@")
        if not all(c.isalnum()or c =="_" for c in a): return False
        domain_name = domain[:-4] #domain but excluding '.com'
        if not domain_name.isalpha(): return False
        return True
    
    valid = users[users["email"].apply(is_valid_email)]
    return valid.sort_values(by="user_id")[["user_id", "email"]]
```
['String', 'MS SQL Server', 'Pandas']