Sample Interview Question SQL/Database Experience
This is a sample question for interviewees that state that they have SQL and Database experience.
Problem:
Join the two tables below without using union, inner join,
or outer join. Only display the first name, street address,
and zip code columns.
Name table
==========
id (PK)
first_name
last_name
Address table
==========
id (PK)
name_id (FK)
street_addr
city
state_id (FK)
zip_code
Answer
select n.first_name, a.street_addr, a.zip_code
from name n, address a
where a.name_id = n.id
Updated: 2020-07-15 | Posted: 2015-10-30