Developer Help Guides

Practice Queries

Please go to Tolko High Level to practice these queries:

1) Write a query to select all the data in std_SMSorter for the currently running shift (do not hardcode the shift number or use the shift selector).

2) Write a query to select all the data in std_SMSorter for the currently running shift, but only for sorter 1 (do not hardcode the shift number or use the shift selector)

3) Open a new query window and press the button to open the shift selector (rightmost button in the query window, looks like a grey button) and select the “Search by Date” tab. Write a query to select all the data in std_SMPrimary between the two dates selected

4) Write a query to select the total sum of logs for the quad between the two dates selected.

5) Write a query to select the average FBM for the Twin between the two dates selected

6) Write a query to select the average Small End Diameter for the Quad between the two dates selected, this average must be a weighted average by logs (this cannot be done using the AVG aggregate)

7) Write a query to select the total FBM for each machine between the two dates selected (you will have to use GROUP BY)

8) Write a query to select the total FBM for each machine between the two dates selected, but only for A Shift and only when the shift is active

9) Write a query to select FBM per hour for Sorter 1 between the two dates selected (hint: use the std_Shiftinfo table)

10) Look at the raw log by log data for the quad at high level (table is tblQUAD_Logs) this is the raw data we pull in from the vendor database before it is summarized into the std tables. write a query using this table to show the total log volume for each floored small end diameter

Example result:

Small End Diameter LogVolume
5 25
6 40
7 63
8 96
9 54
 
developer_guide.txt · Last modified: 2015/12/18 10:50 by darryll