What are the names of products whose availability equals to 1?
create table view_product_availability (product_id varchar, available_yn varchar, PRIMARY KEY (product_id)); create table products_for_hire (product_name varchar, product_id varchar, PRIMARY KEY (product_name))
select t2.product_name from view_product_availability as t1 join products_for_hire as t2 on t1.product_id = t2.product_id where t1.available_yn = 1