Commit 5c54f1b5 authored by Sergio Bruni's avatar Sergio Bruni
Browse files

'm'

parent 0e5b3e03
......@@ -1081,47 +1081,11 @@ OR diff_z > 10
select *
FROM (
select
station,
network network1,
prev_network network2,
count_rinex,
min_x - prev_min_x diff_min_x,
max_y - prev_min_y diff_min_y,
max_z - prev_min_z diff_min_z,
max_x - prev_max_x diff_max_x,
max_y - prev_max_y diff_max_y,
max_z - prev_max_z diff_max_z,
avg_x - prev_avg_x diff_avg_x,
avg_y - prev_avg_y diff_avg_y,
avg_z - prev_avg_z diff_avg_z
FROM (
select
station,
network,
count_rinex,
lag(network) over (partition by station order by station, network) as prev_network,
min_x, min_y, min_z,
lag(min_x) over (partition by station order by station, network) as prev_min_x,
lag(min_y) over (partition by station order by station, network) as prev_min_y,
lag(min_z) over (partition by station order by station, network) as prev_min_z,
max_x, max_y, max_z,
lag(max_x) over (partition by station order by station, network) as prev_max_x,
lag(max_y) over (partition by station order by station, network) as prev_max_y,
lag(max_z) over (partition by station order by station, network) as prev_max_z,
#### Come sopra aggiungendo min e max della differenza e calcolato su una stazione per due reti
#### Come sopra aggiungendo la mediana e calcolato su una singola stazione e due sole reti
```
select *
FROM (
select
......@@ -1129,13 +1093,10 @@ FROM (
network network1,
prev_network network2,
count_rinex,
min_x - prev_min_x diff_min_x,
max_y - prev_min_y diff_min_y,
max_z - prev_min_z diff_min_z,
max_x - prev_max_x diff_max_x,
max_y - prev_max_y diff_max_y,
max_z - prev_max_z diff_max_z,
median_x - prev_median_x diff_median_x,
median_y - prev_median_y diff_median_y,
median_z - prev_median_z diff_median_z,
avg_x - prev_avg_x diff_avg_x,
avg_y - prev_avg_y diff_avg_y,
......@@ -1147,16 +1108,10 @@ FROM (
count_rinex,
lag(network) over (partition by station order by station, network) as prev_network,
min_x, min_y, min_z,
lag(min_x) over (partition by station order by station, network) as prev_min_x,
lag(min_y) over (partition by station order by station, network) as prev_min_y,
lag(min_z) over (partition by station order by station, network) as prev_min_z,
max_x, max_y, max_z,
lag(max_x) over (partition by station order by station, network) as prev_max_x,
lag(max_y) over (partition by station order by station, network) as prev_max_y,
lag(max_z) over (partition by station order by station, network) as prev_max_z,
median_x, median_y, median_z,
lag(median_x) over (partition by station order by station, network) as prev_median_x,
lag(median_y) over (partition by station order by station, network) as prev_median_y,
lag(median_z) over (partition by station order by station, network) as prev_median_z,
avg_x, avg_y, avg_z,
lag(avg_x) over (partition by station order by station, network) as prev_avg_x,
......@@ -1167,12 +1122,11 @@ FROM (
s.marker station,
n.name network,
count(*) count_rinex,
round(min(x_crd_a), 3) min_x,
round(min(y_crd_a), 3) min_y,
round(min(z_crd_a), 3) min_z,
round(max(x_crd_a), 3) max_x,
round(max(y_crd_a), 3) max_y,
round(max(z_crd_a), 3) max_z,
percentile_disc(0.50) within group (order by x_crd_a) median_x,
percentile_disc(0.50) within group (order by y_crd_a) median_y,
percentile_disc(0.50) within group (order by z_crd_a) median_z,
round(avg(x_crd_a), 3) avg_x,
round(avg(y_crd_a), 3) avg_y,
round(avg(z_crd_a), 3) avg_z
......@@ -1189,9 +1143,6 @@ FROM (
ORDER BY s.marker, n.name
) t
) t1
WHERE prev_avg_x IS NOT NULL
) t2
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment