7 kyu

SQL easy regex extraction

Description:

Input

You'll have a table like the following:

name greeting
Austin Gaylord Hola que tal #4702665
Kacie Zulauf Bienvenido 45454545 tal #470815 BD. WA470815

Output

In this practice you'll need to extract from the greeting column the number preceeded by the # symbol and place it in a new column named user_id.

name greeting user_id
Austin Gaylord Hola que tal #4702665 4702665
Kacie Zulauf Bienvenido 45454545 tal #470815 BD. WA470815 470815

NOTE: To keep it simple assume that the iser_id will be having varchar type

Regular Expressions
Fundamentals
Data Science

Stats:

CreatedDec 7, 2018
PublishedDec 7, 2018
Warriors Trained6587
Total Skips700
Total Code Submissions19130
Total Times Completed2854
SQL Completions2854
Total Stars92
% of votes with a positive feedback rating84% of 385
Total "Very Satisfied" Votes290
Total "Somewhat Satisfied" Votes67
Total "Not Satisfied" Votes28
Total Rank Assessments17
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Javatlacati Avatar
  • FArekkusu Avatar
Ad