Commit 9f53eef4 authored by Sergio Bruni's avatar Sergio Bruni
Browse files


parent 5f503a1c
...@@ -1377,3 +1377,48 @@ group by t.id_station ...@@ -1377,3 +1377,48 @@ group by t.id_station
order by t.id_station order by t.id_station
``` ```
**calcola la mediana x,y,z dai rinex delle stazioni della query precedente**
select rn.id_network, id_station, count(*) num_rinex from rinex_file r
JOIN rinex_file_network rn on
JOIN station s on
JOIN location l on = s.id_location
JOIN coordinates c on AND c.x = -1
group by, rn.id_network
max(s.marker) marker,
max( network_name,
max(t2.num_rinex) num_rinex,
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
FROM rinex_file r
select t.id_station, max(t.id_network) id_network, max(t.num_rinex) num_rinex from (
select id_station, max(num_rinex) num_rinex
from t
GROUP BY id_station
) t1
t ON t1.id_station = t.id_station AND t1.num_rinex = t.num_rinex
group by t.id_station
) t2
ON r.id_station=t2.id_station
JOIN rinex_file_network rn ON AND rn.id_network=t2.id_network
JOIN station s ON
JOIN network n ON
WHERE x_crd_a <> 0 AND x_crd_a IS NOT NULL
and y_crd_a <> 0 AND y_crd_a IS NOT NULL
and z_crd_a <> 0 AND z_crd_a IS NOT NULL
GROUP BY t2.id_station, t2.id_network
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