我有一张表:
prod_name - quantity - group
tv - 30 - base
microwave - 10 - base
watch - 5 - base
phone - 25 - base
washer - 15 - base
dryer. - 14 - base
microwave - 7 - inventory_2021
phone - 16 - inventory_2021
tv - 30 - inventory_2022
watch - 5 - inventory_2022
phone - 25 - inventory_2022
我要填写/输入从基础(组)到所有其他组的缺失记录
预期输出:
tv - 30 - base
microwave - 10 - base
watch - 5 - base
phone - 25 - base
washer - 15 - base
dryer. - 14 - base
tv - 30 - inventory_2021
microwave - 7 - inventory_2021
watch - 5 - inventory_2021
phone - 16 - inventory_2021
washer - 15 - inventory_2021
dryer. - 14 - inventory_2021
tv - 30 - inventory_2022
microwave - 10 - inventory_2022
watch - 5 - inventory_2022
phone - 25 - inventory_2022
washer - 15 - inventory_2022
dryer. - 14 - inventory_2022
因此,在输出中,我在每个组中有相同数量的条目,并且条目总数应该与基本组匹配.