Introducing joins

You can join a table onto itself when you are interested by a relationship between two of its rows. The tld column shows the "Top Level Domain" of countries, for example Latvia has the ".la" tld. If you made a website about Angola for Latvian citizen, you could call it "ango.la". In the same way, you could create "domini.ca", "egy.pt", "kuwa.it" ...

Find all the country names who end with the letters of the tld of a country

SELECT w1.name, w2.tld from world w1,world w2 on w1.name like '%'||substring(w2.tld, 2,10)