Answered step by step
Verified Expert Solution
Question
1 Approved Answer
form a SQL query that extracts the last 5 characters of the email address first. As you may realize, the email address always ends with
form a SQL query that extracts the last 5 characters of the email address first. As you may realize, the email address always ends with '.org'.
Now, how can you extract just the dot '.', from the email address?
SAMPLE TABLE:
SAMPLE OUTPUT:
1 2 3 4 5 6 7 8 9 10 11 12 13 customer_id store_id [PK] integer smallint 1 524 1 2 3 4 5 6 7 8 9 10 11 12 " first_name character varying (45) 1 Jared 1 Mary 1 Patricia 1 Linda 2 Barbara 1 Elizabeth. 2 Jennifer 1 Maria 2 Susan 2 Margaret 1 Dorothy 2 Lisa 1 Nancy last name character varying (45) Ely Smith Johnson Williams Jones Brown Davis Miller Wilson Moore Taylor Anderson Thomas email character varying (50) jared.ely@sakilacustomer.org mary.smith@sakilacustomer.org patricia.johnson@sakilacustomer.org linda.williams@sakilacustomer.org barbara.jones@sakilacustomer.org elizabeth.brown@sakilacustomer.org jennifer.davis@sakilacustomer.org maria.miller@sakilacustomer.org susan.wilson@sakilacustomer.org margaret.moore@sakilacustomer.org dorothy.taylor@sakilacustomer.org lisa.anderson@sakilacustomer.org nancv.thomas@sakilacustomer.ora address_id smallint 530 5 activebool boolean true true 6 true 8 9 7 true true true 10 true 11 true 12 true 13 true 14 true 15 true 16 true create_date date 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 2006-02-14 i last update timestamp without time zone 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 2013-05-26 14:49:45.738 active integer 1 1 1 1 1 1 1 1 1 1 1 1 1
Step by Step Solution
★★★★★
3.44 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started