We want a SQL script to operate on WooCommerce database tables directly, about product-category mapping 2

Job ID: 33652796

Budget: $10 – $30 USD

We are building a WooCommerce website and importing more than 100,000 products into it. Now, we want to categorize these products into our categories. In admin UI, there is editing function in "All Product" page to assign the category to the products. However, due to the product list is too long, we want some a sql script to directly operate on DB to make it so that it will only take a few seconds.

Can anyone write this sql script for me? The basic logics are:
1. The products we import are with the brand name in the product title. And we are creating the categories based on the brand name. For example, the product title is:Supply API SigmaX13 plate heat exchanger sealing gasket, the "API" is the brand name, and we have a category also called "API". So we want to put this product into the "API" category.
2. The categories will be pre-set, like the above example, "API" category will be created manually by us in admin UI.
3. When you write the sql script, first you need to check all of the product titles to see if they are with the category name(like "API"), if yes, then creating the product-category mapping. Before creating the mapping, you may also need to find the category id or something like that so that the mapping can be created based on it.

Please bid only if you can do it. If you are not familiar with it, please don't bid.

Thanks.
Related categories: PHP WordPress MySQL WooCommerce