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
Show whitespace changes
Inline
Side-by-side
queries.md
View file @
5c54f1b5
...
...
@@ -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 du
e reti
#### Come sopra aggiungendo
la mediana e calcolato su una singola stazione e due sol
e 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,
m
ax
_x - prev_m
ax
_x diff_m
ax
_x,
m
ax
_y - prev_m
ax
_y diff_m
ax
_y,
m
ax
_z - prev_m
ax
_z diff_m
ax
_z,
m
edian
_x - prev_m
edian
_x diff_m
edian
_x,
m
edian
_y - prev_m
edian
_y diff_m
edian
_y,
m
edian
_z - prev_m
edian
_z diff_m
edian
_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
```
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