SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(first_name, ' ', 2), ' ', -1), first_name FROM consumers--get the second word ni
WHERE LENGTH(first_name) - LENGTH(REPLACE(first_name, ' ', '')) + 1 = 2;
--count the words ni
SELECT first_name, LENGTH(first_name) - LENGTH(REPLACE(first_name, ' ', '')) + 1 AS counting FROM consumers--count the words ni