-- Database schema
| Discount_Coupons : coupon_id [ INT ] primary_key , date_issued [ TEXT ] , coupon_amount [ INT ] | Customers : customer_id [ INT ] primary_key , coupon_id [ INT ] Customers.coupon_id = Discount_Coupons.coupon_id , good_or_bad_customer [ TEXT ] , first_name [ TEXT ] , last_name [ TEXT ] , gender_mf [ TEXT ] , date_became_customer [ TEXT ] , date_last_hire [ TEXT ] | Bookings : booking_id [ INT ] primary_key , customer_id [ INT ] Bookings.customer_id = Customers.customer_id , booking_status_code [ TEXT ] , returned_damaged_yn [ TEXT ] , booking_start_date [ TEXT ] , booking_end_date [ TEXT ] , count_hired [ TEXT ] , amount_payable [ INT ] , amount_of_discount [ INT ] , amount_outstanding [ INT ] , amount_of_refund [ INT ] | Products_for_Hire : product_id [ INT ] primary_key , product_type_code [ TEXT ] , daily_hire_cost [ INT ] , product_name [ TEXT ] , product_description [ TEXT ] | Payments : payment_id [ INT ] primary_key , booking_id [ INT ] Payments.booking_id = Bookings.booking_id , customer_id [ INT ] Payments.customer_id = Customers.customer_id , payment_type_code [ TEXT ] , amount_paid_in_full_yn [ TEXT ] , payment_date [ TEXT ] , amount_due [ INT ] , amount_paid [ INT ] | Products_Booked : booking_id [ INT ] primary_key Products_Booked.booking_id = Bookings.booking_id , product_id [ INT ] Products_Booked.product_id = Products_for_Hire.product_id , returned_yn [ TEXT ] , returned_late_yn [ TEXT ] , booked_count [ INT ] , booked_amount [ INT ] | View_Product_Availability : product_id [ INT ] View_Product_Availability.product_id = Products_for_Hire.product_id , booking_id [ INT ] View_Product_Availability.booking_id = Bookings.booking_id , status_date [ TEXT ] primary_key , available_yn [ TEXT ] |
-- -- What is the id of the product that is booked for 3 times?

SELECT product_id FROM products_booked GROUP BY product_id HAVING count(*)  =  3;