If I have two substring_index, which one gets executed first?

user9371654

If I have two substring_index, which one get executed first? the internal one substring_index(mycol,'/',3), or the external one ?

substring_index(substring_index(`mycol`,'/',3),'://',-1)

Examples of sting I want to treat:

https://www.yahoo.com/
http://google.com/en/

I want to get:

www.yahoo.com
google.com

1) Which substring_index get executed first? This important to know to construct the second substring_index according to the output of what executed first.

2) Is my substring_index statement correct?

scaisEdge

Asu you can easy check

select substring_index(substring_index('https://www.yahoo.com/','/',3),'://',-1);

www.yahoo.com

select substring_index(substring_index('http://google.com/en/','/',3),'://',-1);

google.com

for each nested function is always exectued the inner one .. and recorsively the next outer

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

In Java, which gets executed first, "+" or "++"?

why superclass gets executed first in this program - although I have no main method?

in Backbone model, which method gets executed first, success or parse?

Can I ensure that one of my Spring ApplicationListeners gets executed last?

I have 2 tables in SQL server which I want top pivot such that a new column is created as soon as one table gets updated

Why when I have two mysqli queries one after another I can execute only the first one?

Which one gets loaded first? static block or spring bean?

I am confused in two ways to create one to many relationship in code first migration . Which one to choose?

I have two buttons in one activity, if first button is pressed then two buttons from another activity should be disabled

The first int in one of two arrays is assigned 0 when I leave the for loop in which I assigned them values

I have two select the second one is taking data from JSON which is stored in variable how to give on click

Match the first substring ocurrance in a string that has two such substrings with regex which usually matches the last one by default

How do I create a variable that tells me which of a number of other variables is the first one to not have a missing value for one observation?

How can I have two for loops in the same list but the second one to start from the next value of the first loop?

I have a dataset in which i have two columns with time in it but the dat

Will be executed everything which is into parenthesis first?

which file is executed first in pytest?

When declaring two functions with the same name in a global scope, the second one gets executed

I have a class with one required and two optional parameters, and a repr method which returns with one of the optional params, whichever is given

Does the unary operator really gets executed first?

Is there a regex which will generate a String array by splitting a line for the first two spaces (" ") and then adding the rest to one array index?

How do I make two arrays in which first one would be values and second one would be keys for those values?

why is only one thread gets executed and other is not

I have made a copy of the list , and have executed certain operations on it. But after a point the real matrix ,that is the list gets affected

Can I have two actions in one IconButton?

How do I delete rows which have only one entry in multi-index dataframe?

Combining two drawables, one over another which have a different size

Initialize dataframe with two columns which have one of the them all zeros

I have a navbar with two logos - the one which is not the navbar-brand should stay in-line with the button for collapsing while the menu collapses