Amazon Interview Question

Write an inner join between two tables.

Interview Answers

Anonymous

May 24, 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

Jun 17, 2012

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

2

Anonymous

May 24, 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