Amazon Interview Question: Write an inner join between t... | Glassdoor

Interview Question

Business Analyst Interview Seattle, WA

Write an inner join between two tables.

Answer

Interview Answer

3 Answers

1

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 :-)

Harshit Pandey on May 23, 2012
5

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 :-)

Harshit Pandey on May 23, 2012
2

another answer.

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

kimo on Jun 16, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.