Joining two Tables with matching two values I have two tables. One is user. user has two columns. 


user_id
user_name   


The other table is product. product has two columns. 


product_type 
seller_id


seller_id is a foreign key of user.user_id. 

An example of product_type is "laptop". 
I want to list all the names of users who are selling laptops. 
(SQL Query)
SELECT user_name FROM user u
WHERE EXISTS (SELECT 1 FROM product p
                WHERE product_type = 'laptop'
                AND p.seller_id = u.user_id)