Amazon interview question

Write an inner join between two tables.

Interview Answers

Anonymous

24 May 2012

MS-SQL lets assume two tables - City and State each having common column called population here is the join on population field Select * from City Inner join State ON city.population = state.population Done :-)

6

Anonymous

17 June 2012

another answer. select * from table_A a, table_B a where a.population = b.population; pick one old or new school :-)

2

Anonymous

24 May 2012

MS-SQL lets assume two tables - City and State each having common column called population here is the join on population field Select * from City Inner join State ON city.population = state.population Done :-)

1