select l.prod, l.id list_id, l.list_val from list l left join main m on <Дальше сам>
SELECT `p`.`PROD` AS `PROD`, `l`.`ID` AS `LIST_ID`,
IF(`m`.`PROD` IS NULL, NULL, `l`.`LIST_VAL`) AS `LIST_VAL`
FROM (
SELECT DISTINCT `PROD`
FROM `main`
) AS `p`
JOIN `list` AS `l`
LEFT JOIN `main` AS `m`
ON `m`.`PROD` = `p`.`PROD` AND `m`.`LIST_ID` = `l`.`ID`
ORDER BY `p`.`PROD`, `l`.`ID`