# `viw_mftproductionreportemployeeday` (view)


- **Updatable:** NO

## Columns

| # | Name | Type | Null |
|---|---|---|---|
| 1 | `sId` | `varchar(100)` | NO |
| 2 | `sBrandsId` | `varchar(100)` | NO |
| 3 | `sSubsidiaryId` | `varchar(100)` | NO |
| 4 | `tCreateDate` | `datetime` | NO |
| 5 | `sCreateDate` | `varchar(10)` | YES |
| 6 | `sMakePerson` | `varchar(255)` | NO |
| 7 | `sFormId` | `varchar(100)` | NO |
| 8 | `iOrder` | `int` | NO |
| 9 | `sBillNo` | `varchar(255)` | NO |
| 10 | `sMemo` | `text` | YES |
| 11 | `bCheck` | `bit(1)` | NO |
| 12 | `tCheckDate` | `datetime` | YES |
| 13 | `sCheckPerson` | `varchar(255)` | YES |
| 14 | `bPrint` | `bit(1)` | NO |
| 15 | `bCopyLimit` | `bit(1)` | NO |
| 16 | `sStatus` | `varchar(255)` | YES |
| 17 | `bInvalid` | `bit(1)` | NO |
| 18 | `sProductionReportId` | `varchar(100)` | NO |
| 19 | `iProductionReportOrder` | `int` | NO |
| 20 | `sCustomerId` | `varchar(100)` | NO |
| 21 | `sManualNo` | `varchar(255)` | YES |
| 22 | `sCustomerOrderNo` | `varchar(255)` | YES |
| 23 | `sProductId` | `varchar(100)` | NO |
| 24 | `sProcessId` | `varchar(100)` | NO |
| 25 | `dProductQty` | `decimal(18,6)` | NO |
| 26 | `sSrcControlId` | `varchar(100)` | YES |
| 27 | `sPartsName` | `varchar(255)` | YES |
| 28 | `sMachineId` | `varchar(255)` | YES |
| 29 | `tStartDate` | `datetime` | YES |
| 30 | `tEndDate` | `datetime` | YES |
| 31 | `sTeamId` | `varchar(100)` | NO |
| 32 | `sTeamType` | `varchar(50)` | YES |
| 33 | `dProcessQty` | `decimal(40,6)` | YES |
| 34 | `dHour` | `decimal(40,6)` | YES |
| 35 | `dQualifiedProductionQty` | `decimal(40,6)` | YES |
| 36 | `dNoQualifiedProductQty` | `decimal(40,6)` | YES |
| 37 | `dWasteProductionQty` | `decimal(40,6)` | YES |
| 38 | `dWageMoney` | `decimal(40,6)` | YES |
| 39 | `iIncrement` | `int` | NO |
| 40 | `bAffirm` | `bit(1)` | NO |
| 41 | `tAffirmDate` | `datetime` | YES |
| 42 | `sAffirm` | `varchar(255)` | NO |
| 43 | `dEmpHour` | `decimal(18,6)` | YES |
| 44 | `sEmployeeId` | `varchar(255)` | YES |
| 45 | `sSlaveId` | `varchar(100)` | NO |

## Definition

```sql
select `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`,`mftproductionreportmaster`.`sMakePerson` AS `sMakePerson`,`mftproductionreportmaster`.`sFormId` AS `sFormId`,`mftproductionreportmaster`.`iOrder` AS `iOrder`,`mftproductionreportmaster`.`sBillNo` AS `sBillNo`,`mftproductionreportmaster`.`sMemo` AS `sMemo`,`mftproductionreportmaster`.`bCheck` AS `bCheck`,`mftproductionreportmaster`.`tCheckDate` AS `tCheckDate`,`mftproductionreportmaster`.`sCheckPerson` AS `sCheckPerson`,`mftproductionreportmaster`.`bPrint` AS `bPrint`,`mftproductionreportmaster`.`bCopyLimit` AS `bCopyLimit`,`mftproductionreportmaster`.`sStatus` AS `sStatus`,`mftproductionreportmaster`.`bInvalid` AS `bInvalid`,`mftproductionreportslave`.`sId` AS `sProductionReportId`,`mftproductionreportslave`.`iOrder` AS `iProductionReportOrder`,`mftproductionreportslave`.`sCustomerId` AS `sCustomerId`,`mftproductionreportslave`.`sManualNo` AS `sManualNo`,`mftproductionreportslave`.`sCustomerOrderNo` AS `sCustomerOrderNo`,`mftproductionreportslave`.`sProductId` AS `sProductId`,`mftproductionreportslave`.`sProcessId` AS `sProcessId`,`mftproductionreportslave`.`dProductQty` AS `dProductQty`,`mftproductionreportslave`.`sSrcControlId` AS `sSrcControlId`,`mftproductionreportslave`.`sPartsName` AS `sPartsName`,`mftproductionreportslave`.`sMachineId` AS `sMachineId`,`mftproductionreportslave`.`tStartDate` AS `tStartDate`,`mftproductionreportslave`.`tEndDate` AS `tEndDate`,`mftproductionreportslave`.`sTeamId` AS `sTeamId`,`mftproductionreportslave`.`sTeamType` AS `sTeamType`,sum(`mftproductionreportslave`.`dProcessQty`) AS `dProcessQty`,sum(`mftproductionreportslave`.`dHour`) AS `dHour`,sum(`mftproductionreportslave`.`dQualifiedProductionQty`) AS `dQualifiedProductionQty`,sum(`mftproductionreportslave`.`dNoQualifiedProductQty`) AS `dNoQualifiedProductQty`,sum(`mftproductionreportslave`.`dWasteProductionQty`) AS `dWasteProductionQty`,sum(`mftproductionreportslave`.`dWageMoney`) AS `dWageMoney`,`mftproductionreportslave`.`iIncrement` AS `iIncrement`,`mftproductionreportslave`.`bAffirm` AS `bAffirm`,`mftproductionreportslave`.`tAffirmDate` AS `tAffirmDate`,`mftproductionreportslave`.`sAffirm` AS `sAffirm`,`mftproductionreportslave`.`dEmpHour` AS `dEmpHour`,`mftproductionreportemployee`.`sEmployeeId` AS `sEmployeeId`,`mftproductionreportemployee`.`sId` AS `sSlaveId` from ((`mftproductionreportmaster` join `mftproductionreportslave` on((`mftproductionreportslave`.`sParentId` = `mftproductionreportmaster`.`sId`))) join `mftproductionreportemployee` on((`mftproductionreportemployee`.`sSlaveId` = `mftproductionreportslave`.`sId`))) where ((`mftproductionreportslave`.`bAffirm` = 1) and (`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._
