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

aa

parent 91f4294b
......@@ -911,3 +911,34 @@ order by s.marker
-- limit 10
```
#### data ogni coppia di rinex duplicati esegue la differenza tra le posizioni x,y,z
```
select name,
current_x_crd_a,
prev_x_crda,
current_x_crd_a - prev_x_crda as diff
from (
select
name,
x_crd_a as current_x_crd_a,
lag(x_crd_a) over (partition by name order by name) as prev_x_crda,
row_number() over (partition by name order by name desc) as rn
from
(
select * from rinex_file where name in
(
select name
from rinex_file r
where id_station=(select id from station where marker='PIOB')
group by name
having count(*) = 2
)
) a
) t
where current_x_crd_a is not null and prev_x_crda is not null
order by current_x_crd_a - prev_x_crda desc
```
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