# `viw_zlldgroupby_sgdandsmaterialsid`（视图）


- **是否可更新：** NO
- **定义者：** `xlyprint@%`

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sWorkOrderMaterialsTbId` | `varchar(100)` | NO |
| 2 | `lldsMaterialsId` | `varchar(100)` | YES |
| 3 | `LldQty` | `decimal(40,6)` | YES |
| 4 | `LldsMaterialsStyle` | `varchar(255)` | NO |

## 定义

```sql
select `xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sWorkOrderMaterialsTbId` AS `sWorkOrderMaterialsTbId`,min(`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sMaterialsId`) AS `lldsMaterialsId`,sum(if((`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sFormId` = '192116810113315226622476570'),-(`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`dAuxiliaryQty`),`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`dAuxiliaryQty`)) AS `LldQty`,`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sMaterialsStyle` AS `LldsMaterialsStyle` from `xlyweberp_saas_ai`.`viw_mitproductionmaterials` where (`xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sWorkOrderNo` <> '') group by `xlyweberp_saas_ai`.`viw_mitproductionmaterials`.`sWorkOrderMaterialsTbId`
```

## 说明

_暂无人工说明。_
