# `viw_kpimaster`（视图）


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

## 字段

| # | 名称 | 类型 | 可空 |
|---|---|---|---|
| 1 | `sUserName` | `varchar(255)` | NO |
| 2 | `tCreateDate` | `datetime` | NO |
| 3 | `iTodayOk` | `decimal(32,0)` | YES |
| 4 | `iTodayNo` | `decimal(32,0)` | YES |
| 5 | `iTodayTotal` | `decimal(32,0)` | YES |
| 6 | `iTodayStandard` | `decimal(32,0)` | YES |
| 7 | `iStandardRate` | `decimal(39,4)` | YES |
| 8 | `dCompRate` | `decimal(39,4)` | YES |
| 9 | `sId` | `varchar(255)` | NO |
| 10 | `sBrandsId` | `varchar(255)` | NO |
| 11 | `sSubsidiaryId` | `varchar(255)` | NO |
| 12 | `sSlaveId` | `varchar(255)` | NO |
| 13 | `drewardMoney` | `decimal(18,6)` | NO |
| 14 | `dpunishmentMoney` | `decimal(18,6)` | NO |
| 15 | `sUnTaskFromId` | `varchar(255)` | NO |

## 定义

```sql
select `xlyweberp_saas_ai`.`sftlogininfo`.`sUserName` AS `sUserName`,`xlyweberp_saas_ai`.`kpimaster`.`tCreateDate` AS `tCreateDate`,sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayOk`) AS `iTodayOk`,sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayNo`) AS `iTodayNo`,sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayTotal`) AS `iTodayTotal`,sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayStandard`) AS `iTodayStandard`,((100 * sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayStandard`)) / sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayTotal`)) AS `iStandardRate`,((100 * sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayOk`)) / sum(`xlyweberp_saas_ai`.`kpimaster`.`iTodayTotal`)) AS `dCompRate`,`xlyweberp_saas_ai`.`kpimaster`.`sId` AS `sId`,`xlyweberp_saas_ai`.`kpimaster`.`sBrandsId` AS `sBrandsId`,`xlyweberp_saas_ai`.`kpimaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`xlyweberp_saas_ai`.`kpimaster`.`sId` AS `sSlaveId`,`xlyweberp_saas_ai`.`kpimaster`.`drewardMoney` AS `drewardMoney`,`xlyweberp_saas_ai`.`kpimaster`.`dpunishmentMoney` AS `dpunishmentMoney`,`xlyweberp_saas_ai`.`kpimaster`.`sUnTaskFromId` AS `sUnTaskFromId` from (`xlyweberp_saas_ai`.`kpimaster` join `xlyweberp_saas_ai`.`sftlogininfo` on((`xlyweberp_saas_ai`.`kpimaster`.`sMakePerson` = `xlyweberp_saas_ai`.`sftlogininfo`.`sId`))) group by `xlyweberp_saas_ai`.`kpimaster`.`sMakePerson`,`xlyweberp_saas_ai`.`kpimaster`.`tCreateDate`
```

## 说明

_暂无人工说明。_
