I need help with an equation that I'm trying to resolve here. I need to construct a query that would output the result highlighted with RED given the url value highlighted with BLUE, using the "name1" match from field_one as a reference.
| field_one | field_two
| name0_url | http://siteX.com
| name1_url | http://siteY.com
| name2_url | http://siteZ.com
| name0_num | 2
| name1_num | 2
| name2_num | 2
My understanding is that my query should contain something like:
REPLACE(field_one, 'url', 'num') as number
I also have the feeling I could somehow make use of the following statement:
IF(REPLACE(field_one, 'url', '') = REPLACE(fieldone, '_num', ''), 1, 0) AS matches
Please give me some idea or point out the right direction, thanks a lot!