I want to retrieve all product IDs that has a specific (custom) option value (provided by the customer in the frontend) from all orders - regardless of store/website.

The option is a text field (`Mage_Catalog_Model_Product_Option_Type_Text`), the SKU (and title) is **test\_option** and the value I'm looking for is **green**.

I would prefer to do this with a raw MySQL query, but a solution using Magentos models/collections would definitely suffice.