Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergio Bruni
utils
Commits
5c54f1b5
Commit
5c54f1b5
authored
Aug 29, 2019
by
Sergio Bruni
Browse files
'm'
parent
0e5b3e03
Changes
1
Hide whitespace changes
Inline
Side-by-side
queries.md
View file @
5c54f1b5
...
@@ -1081,47 +1081,11 @@ OR diff_z > 10
...
@@ -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 la mediana e calcolato su una singola stazione e due sole reti
#### Come sopra aggiungendo min e max della differenza e calcolato su una stazione per due reti
```
```
select *
select *
FROM (
FROM (
select
select
...
@@ -1129,14 +1093,11 @@ FROM (
...
@@ -1129,14 +1093,11 @@ FROM (
network network1,
network network1,
prev_network network2,
prev_network network2,
count_rinex,
count_rinex,
min_x - prev_min_x diff_min_x,
max_y - prev_min_y diff_min_y,
median_x - prev_median_x diff_median_x,
max_z - prev_min_z diff_min_z,
median_y - prev_median_y diff_median_y,
median_z - prev_median_z diff_median_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_x - prev_avg_x diff_avg_x,
avg_y - prev_avg_y diff_avg_y,
avg_y - prev_avg_y diff_avg_y,
avg_z - prev_avg_z diff_avg_z
avg_z - prev_avg_z diff_avg_z
...
@@ -1147,17 +1108,11 @@ FROM (
...
@@ -1147,17 +1108,11 @@ FROM (
count_rinex,
count_rinex,
lag(network) over (partition by station order by station, network) as prev_network,
lag(network) over (partition by station order by station, network) as prev_network,
min_x, min_y, min_z,
median_x, median_y, median_z,
lag(min_x) over (partition by station order by station, network) as prev_min_x,
lag(median_x) over (partition by station order by station, network) as prev_median_x,
lag(min_y) over (partition by station order by station, network) as prev_min_y,
lag(median_y) over (partition by station order by station, network) as prev_median_y,
lag(min_z) over (partition by station order by station, network) as prev_min_z,
lag(median_z) over (partition by station order by station, network) as prev_median_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,
avg_x, avg_y, avg_z,
avg_x, avg_y, avg_z,
lag(avg_x) over (partition by station order by station, network) as prev_avg_x,
lag(avg_x) over (partition by station order by station, network) as prev_avg_x,
lag(avg_y) over (partition by station order by station, network) as prev_avg_y,
lag(avg_y) over (partition by station order by station, network) as prev_avg_y,
...
@@ -1167,12 +1122,11 @@ FROM (
...
@@ -1167,12 +1122,11 @@ FROM (
s.marker station,
s.marker station,
n.name network,
n.name network,
count(*) count_rinex,
count(*) count_rinex,
round(min(x_crd_a), 3) min_x,
round(min(y_crd_a), 3) min_y,
percentile_disc(0.50) within group (order by x_crd_a) median_x,
round(min(z_crd_a), 3) min_z,
percentile_disc(0.50) within group (order by y_crd_a) median_y,
round(max(x_crd_a), 3) max_x,
percentile_disc(0.50) within group (order by z_crd_a) median_z,
round(max(y_crd_a), 3) max_y,
round(max(z_crd_a), 3) max_z,
round(avg(x_crd_a), 3) avg_x,
round(avg(x_crd_a), 3) avg_x,
round(avg(y_crd_a), 3) avg_y,
round(avg(y_crd_a), 3) avg_y,
round(avg(z_crd_a), 3) avg_z
round(avg(z_crd_a), 3) avg_z
...
@@ -1189,9 +1143,6 @@ FROM (
...
@@ -1189,9 +1143,6 @@ FROM (
ORDER BY s.marker, n.name
ORDER BY s.marker, n.name
) t
) t
) t1
) t1
WHERE prev_avg_x IS NOT NULL
) t2
```
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment