我需要在teradata上执行以下脚本,以从下表中获取不同的ID-COLUMN ID,然后按不同的列ID对列设备进行计数,然后从列名AB,BEGOOD SUBSTRING到新列中,现场
ID Device Name
11123503 500 AB_BEGOOD_ONSITE_VOOM
11123503 700 AB_LATESTMODEL_ONSITE_VOOM
11123503 900 AB_LATESTMODEL_ONSITE_VOOM
11123503 870 AB_LATESTMODEL_ONSITE_VOOM
11123503 489 AB_LATESTMODEL_ONSITE_VOOM
11132048 134 AB_BEGOOD_ONSITE_VOOM
11132048 342 AB_BEGOOD_ONSITE_VOOM
11132048 545 AB_BEGOOD_ONSITE_VOOM
11132048 847 AB_BEGOOD_ONSITE_VOOM