I found a similar question on this page Mysql query to extract domains from urls
SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(target_url, '/', 3), '://', -1), '/', 1), '?', 1) AS domain
But the result of this code is not correct
'www.abc.com' 'lalala.one.google.com' 'two.one.test.com'
I need to get the 2 last words, separator is dot.
I need this result
'abc.com' 'google.com' 'test.com'