doc. Add useful sql queries

This commit is contained in:
Фролов 2021-10-06 16:30:28 +05:00
parent 22f13cdfcc
commit 3d1f96655a
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1 @@
select setval('t_well_operation_id_seq', 175);

View File

@ -0,0 +1,25 @@
SELECT
to_timestamp(unix_date),
twoc.name,
duration_sec,
operation_start_depth,
operation_end_depth,
is_bit_posision_lt_20,
is_bit_position_decreasing,
is_bit_position_increasing,
is_block_posision_decresing,
is_block_posision_incresing,
is_hook_weight_lt_3,
is_hook_weight_not_changes,
is_pressure_gt_20,
is_pressure_lt_20,
is_rotor_speed_gt_3,
is_rotor_speed_lt_3,
is_well_depth_increasing,
is_well_depth_decreasing
FROM t_telemetry_analysis
LEFT JOIN t_well_operation_category twoc on t_telemetry_analysis.id_operation = twoc.id
where id_telemetry = 34 and not id_operation in (0, 1, 15)
order by unix_date, operation_start_depth
Limit 1000;