50 lines
2.3 KiB
Markdown
50 lines
2.3 KiB
Markdown
# Processes by Req 4
|
|
Analysis generated on: 4/2/2025 10:07:20 AM
|
|
---
|
|
## SQL Statement
|
|
```sql
|
|
SELECT [Processes by Req 3].Prtno, [Processes by Req 3].ACTIV, [Processes by Req 3].USAGE, Process.CutType INTO ShearTrimCut
|
|
FROM ([Processes by Req 3] INNER JOIN [Shear Trim Cut] ON [Processes by Req 3].Prtno = [Shear Trim Cut].PartNumber) INNER JOIN Process ON [Shear Trim Cut].PartNumber = Process.PartNumber
|
|
WHERE (((Process.CutType)="Multiple"));
|
|
|
|
```
|
|
## Dependencies
|
|
- [[Tables/Process]]
|
|
## Parameters
|
|
- *None*
|
|
## What it does
|
|
**SQL Query Description**
|
|
==========================
|
|
|
|
### Purpose
|
|
|
|
This SQL query retrieves data from multiple tables to identify processes with a specific cut type, specifically "Multiple".
|
|
|
|
### Tables and Columns Involved
|
|
|
|
* `[Processes by Req 3]`: This table contains process information.
|
|
* `Prtno` (Primary Number): Unique identifier for each process.
|
|
* `ACTIV` (Activity): Status or activity associated with the process.
|
|
* `USAGE` (Usage): The usage of a particular cut type in a process.
|
|
* `[Shear Trim Cut]`: This table contains information about shear trim cuts.
|
|
* `PartNumber`: Unique identifier for each part number.
|
|
* `Process`: This table contains process information related to the shear trim cuts.
|
|
* `CutType`: The type of cut used in a process.
|
|
|
|
### Query Logic
|
|
|
|
The query follows these steps:
|
|
|
|
1. **Inner Join**: It performs an inner join between `[Processes by Req 3]` and `[Shear Trim Cut]` tables based on the `Prtno` (Primary Number) column.
|
|
2. **Inner Join**: Then, it performs another inner join with the `Process` table based on the `PartNumber` column.
|
|
3. **Filtering**: The query filters the results to only include rows where the `CutType` in the `Process` table is equal to "Multiple".
|
|
4. **Result Projection**: Finally, it projects the result into a new table with the following columns:
|
|
* `[Processes by Req 3].Prtno`: The Primary Number of processes.
|
|
* `[Processes by Req 3].ACTIV`: The activity associated with the process.
|
|
* `[Processes by Req 3].USAGE`: The usage of "Multiple" in a process.
|
|
* `ShearTrimCut`: A new column named `ShearTrimCut` containing the cut type for each process.
|
|
|
|
### Overall Outcome
|
|
|
|
The query provides an overview of processes that use a specific cut type, "Multiple", along with their associated activities and usages.
|