Pergunta de entrevista da empresa Polestar Analytics

There is a table named GEO, having state and city as it's attribute! Write a query to select the states having the same corresponding city?

Resposta da entrevista

Sigiloso

7 de set. de 2019

Solved it! select state from geo g1 inner join geo g2 on g1.city = g2.city where g1.state is not g2 .state ;