Find a list of magento sku's and the category paths they belong in via MySQL query.
SELECT product_id, sku, catid, cce.path FROM (
SELECT entity_id as product_id, category_id as catid FROM (
SELECT `e`.entity_id, `at_category_id`.`category_id`
FROM `catalog_product_entity` AS `e`
LEFT JOIN `catalog_category_product` AS `at_category_id`
ON (at_category_id.`product_id`=e.entity_id)
) sub_query
) final_query
INNER JOIN `catalog_category_entity` as `cce` on cce.entity_id = catid
INNER JOIN `catalog_product_entity` as `cpe` on cpe.entity_id = product_id