Professional Documents
Culture Documents
1. Write a Query, to get Last StepID, and Last Qty from table above.
Note : Try to get last record(sort by out date)
Statement Input: LOTNO = ‘702ZZAB’
Expected Output:
LOTNO LASTSTEP LASTQTY LASTTRANSACTION
702ZZAB A265 2327 20170121 230450000
2. Get Yield information from T_TRAN, display only those step with yield lose (2 decimal).
Note: Yield = (OUT Qty/ IN Qty) * 100
Statement Input: LOTNO = ‘702ZZAC’
4. Get LotNo that with PMC process, by link T_PROCESS table with T_TRAN table.
STEPID DESCRIPTION
A060 DIEATTACH
A085 WIREBOND
A115 PMC
A120 MOLD
A265 FYI
Table Name : T_PROCESS
Output :
LOTNO
702ZZAB
702ZZAC
6. Write 1 simple query base on T_TRAN table, to return LotNo with more than 2 records.
Output :
LOTNO
702ZZAC
7. Write a simple stored procedure, by passing in 2 parameter and return 1 result with Sum all
number in between.
e.g. Parameter 1 = 10, Parameter 2 = 15, Result = 50 (11+12+13+14)
9. In an array 1-100 numbers are stored, one number is missing how do you find it?