add: database view for single/extra results

This commit is contained in:
Wataru Otsubo 2024-09-13 15:33:52 +09:00 committed by qwjyh
parent 21f38e83db
commit 4eafc8bdc6
2 changed files with 86 additions and 14 deletions

View file

@ -95,25 +95,71 @@ CREATE TABLE qaqc_positions (
CREATE VIEW qaqc_single_run_table
AS
SELECT
qaqc_single_run_results.psboard_id,
ps_boards.id AS psboard_id,
qaqc_single_run_results.daughterboard_id,
qaqc_positions.name,
qaqc_single_run_results.runid,
qaqc_runs.run_datetime,
qaqc_runs.shiftscript_ver,
qaqc_single_run_results.runid AS runid,
qaqc_runs.run_datetime AS run_timestamp,
qaqc_runs.shifter,
qaqc_runs.note AS run_note,
qaqc_positions.name as position,
qaqc_single_run_results.qspip,
qaqc_single_run_results.recov,
qaqc_single_run_results.power,
qaqc_single_run_results.clock,
qaqc_single_run_results.asdtp,
qaqc_single_run_results.reset,
qaqc_single_run_results.qaqc_result
qaqc_single_run_results.qaqc_result,
qaqc_runs.shiftscript_ver,
qaqc_runs.shifter,
qaqc_single_run_results.note AS result_note
FROM
ps_boards,
qaqc_single_run_results,
qaqc_positions,
qaqc_runs
WHERE
qaqc_positions.id = qaqc_single_run_results.position AND
qaqc_runs.id = qaqc_single_run_results.runid;
ps_boards.id = qaqc_single_run_results.psboard_id
AND qaqc_single_run_results.runid = qaqc_runs.id
AND qaqc_positions.id = qaqc_single_run_results.position
-- AND ps_boards.id = 356
ORDER BY
qaqc_runs.run_datetime ASC,
qaqc_positions.id;
CREATE VIEW qaqc_extra_run_table
AS
SELECT
ps_boards.id AS psboard_id,
qaqc_runs.id AS runid,
qaqc_runs.run_datetime AS run_timestamp,
qaqc_runs.shifter,
qaqc_runs.note AS run_note,
qaqc_positions.name as position,
qaqc_extra_run_results.insufficient_reset_with_10,
qaqc_extra_run_results.reset_failed_though_reconfig_done,
qaqc_extra_run_results.always_hit_flag_true,
qaqc_extra_run_results.dac_is_0,
qaqc_extra_run_results.efficiency_99percent,
qaqc_extra_run_results.bcid_shift,
qaqc_extra_run_results.bcid_fail_000,
qaqc_extra_run_results.bcid_fail_111,
qaqc_extra_run_results.low_efficiency,
qaqc_extra_run_results.bcid_fail,
qaqc_extra_run_results.power_out_of_range,
qaqc_extra_run_results.invalid_register_value,
qaqc_runs.shiftscript_ver,
qaqc_runs.shifter,
qaqc_extra_run_results.note AS result_note
FROM
ps_boards,
qaqc_extra_run_results,
qaqc_positions,
qaqc_runs
WHERE
ps_boards.id = qaqc_extra_run_results.psboard_id
AND qaqc_extra_run_results.runid = qaqc_runs.id
AND qaqc_positions.id = qaqc_extra_run_results.position
ORDER BY
qaqc_runs.id ASC,
qaqc_positions.id;