Which product descriptions contain the letter t?
select t2.product_name from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
Buying price.
select t2.typical_buying_price from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
What is the average buying price?
select avg ( t2.typical_buying_price ) from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'
Which of those products does not have a buying price?
select t2.product_name from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%' and t2.typical_buying_price = ""