text: CREATE TABLE products_for_hire (product_type_code VARCHAR) -- How many different product types are there? SELECT COUNT(DISTINCT product_type_code) FROM products_for_hire CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, gender_mf VARCHAR, good_or_bad_customer VARCHAR) -- What are the first name, last name, and gender of all the good customers? Order by their last name. SELECT first_name, last_name, gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name CREATE TABLE payments (amount_due INTEGER) -- What is the average amount due for all the payments? SELECT AVG(amount_due) FROM payments CREATE TABLE products_booked (booked_count INTEGER) -- What are the maximum, minimum, and average booked count for the products booked? SELECT MAX(booked_count), MIN(booked_count), AVG(booked_count) FROM products_booked CREATE TABLE payments (payment_type_code VARCHAR) -- What are all the distinct payment types? SELECT DISTINCT payment_type_code FROM payments CREATE TABLE Products_for_hire (daily_hire_cost VARCHAR, product_name VARCHAR) -- What are the daily hire costs for the products with substring 'Book' in its name? SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%' CREATE TABLE products_booked (product_id VARCHAR, booked_amount INTEGER); CREATE TABLE Products_for_hire (product_id VARCHAR, booked_amount INTEGER) -- How many products are never booked with amount higher than 200? SELECT COUNT(*) FROM Products_for_hire WHERE NOT product_id IN (SELECT product_id FROM products_booked WHERE booked_amount > 200)