# `viw_mftproductionreportemployeeday_1` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sMachineId` | `varchar(255)` | YES |
| 2 | `sId` | `varchar(100)` | NO |
| 3 | `sBrandsId` | `varchar(100)` | NO |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |
| 5 | `tCreateDate` | `datetime` | NO |
| 6 | `sCreateDate` | `varchar(10)` | YES |
| 7 | `dNoQualifiedProductQty` | `decimal(40,6)` | YES |
| 8 | `dProcessQty` | `decimal(40,6)` | YES |
| 9 | `iOrder` | `int` | NO |
| 10 | `dQualifiedProductionQty` | `decimal(40,6)` | YES |
| 11 | `dHour` | `decimal(40,6)` | YES |
| 12 | `dWageMoney` | `decimal(40,6)` | YES |
| 13 | `sTeamId` | `varchar(100)` | NO |
| 14 | `sTeamType` | `varchar(50)` | YES |
| 15 | `sEmployeeId` | `varchar(255)` | YES |
| 16 | `sCustomerId` | `varchar(100)` | NO |
| 17 | `sProductId` | `varchar(100)` | NO |
| 18 | `sEmployeeName` | `varchar(255)` | YES |
| 19 | `sMachineName` | `varchar(100)` | YES |
| 20 | `sTeamName` | `varchar(255)` | YES |

## Definition

```sql
select `mftproductionreportslave`.`sMachineId` AS `sMachineId`,`mftproductionreportmaster`.`sId` AS `sId`,`mftproductionreportmaster`.`sBrandsId` AS `sBrandsId`,`mftproductionreportmaster`.`sSubsidiaryId` AS `sSubsidiaryId`,`mftproductionreportmaster`.`tCreateDate` AS `tCreateDate`,date_format(`mftproductionreportmaster`.`tCreateDate`,'%Y-%m-%d') AS `sCreateDate`,sum(`mftproductionreportslave`.`dNoQualifiedProductQty`) AS `dNoQualifiedProductQty`,sum(`mftproductionreportslave`.`dProcessQty`) AS `dProcessQty`,`mftproductionreportmaster`.`iOrder` AS `iOrder`,sum(`mftproductionreportslave`.`dQualifiedProductionQty`) AS `dQualifiedProductionQty`,sum(`mftproductionreportslave`.`dHour`) AS `dHour`,sum(`mftproductionreportslave`.`dWageMoney`) AS `dWageMoney`,`mftproductionreportslave`.`sTeamId` AS `sTeamId`,`mftproductionreportslave`.`sTeamType` AS `sTeamType`,`mftproductionreportemployee`.`sEmployeeId` AS `sEmployeeId`,`mftproductionreportslave`.`sCustomerId` AS `sCustomerId`,`mftproductionreportslave`.`sProductId` AS `sProductId`,`e`.`sEmployeeName` AS `sEmployeeName`,`em`.`sMachineName` AS `sMachineName`,`t`.`sTeamName` AS `sTeamName` from (((((`mftproductionreportmaster` join `mftproductionreportslave` on(((`mftproductionreportslave`.`sParentId` = `mftproductionreportmaster`.`sId`) and (`mftproductionreportslave`.`bAffirm` = 1)))) join `mftproductionreportemployee` on((`mftproductionreportemployee`.`sSlaveId` = `mftproductionreportslave`.`sId`))) left join `eleemployee` `e` on((`e`.`sId` = `mftproductionreportemployee`.`sEmployeeId`))) left join `elemachine` `em` on((`em`.`sId` = `mftproductionreportslave`.`sMachineId`))) left join `eleteam` `t` on((`t`.`sId` = `mftproductionreportslave`.`sTeamId`))) where (`mftproductionreportmaster`.`bInvalid` = 0) group by date_format(`mftproductionreportmaster`.`tCreateDate`,'%Y-%m-%d'),`mftproductionreportemployee`.`sEmployeeId`,`mftproductionreportslave`.`sMachineId`,`mftproductionreportslave`.`sTeamId`,`mftproductionreportslave`.`sTeamType`
```

## Narrative

_No human-written narrative yet._
