Modules
Data Analyst
Data Engineer
Product Data Scientist
AI Engineer
Machine Learning Engineer
Prompt Engineer
Working again with the users table, your goal is to write an SQL query that extracts the middle 2 digits (the middle segment) from each user's SSN. For example, if a user's SSN is '1234-56-7891', your query should extract '56'.
Your final output should display each user's name along with their extracted middle SSN number.
users table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user |
| name | The full name of the user |
| zip_code | The user's zip code |
| ssn_number | The user's Social Security Number |
| name | middle_ssn |
|---|
| Alice Johnson | 45 |
| Bob Smith | 56 |
| Charlie Brown | 67 |
Working again with the users table, your goal is to write an SQL query that extracts the middle 2 digits (the middle segment) from each user's SSN. For example, if a user's SSN is '1234-56-7891', your query should extract '56'.
Your final output should display each user's name along with their extracted middle SSN number.
users table:
| Column Name | Description |
|---|---|
| user_id | Unique identifier for each user |
| name | The full name of the user |
| zip_code | The user's zip code |
| ssn_number | The user's Social Security Number |
| name | middle_ssn |
|---|---|
| Alice Johnson | 45 |
| Bob Smith | 56 |
| Charlie Brown | 67 |