INFO: The new Git default branch name is "main". Details here: https://about.gitlab.com/blog/2021/03/10/new-git-default-branch-name/

Commit ae67d00e authored by Sergio Bruni's avatar Sergio Bruni
Browse files

m

parent 9e199d11
......@@ -111,8 +111,8 @@ SELECT
w1.network_name,
w1.station_code,
-- w1.bad,
EXTRACT(YEAR FROM w1.day) as year,
EXTRACT(DOY FROM w1.day) as doy,
EXTRACT(YEAR FROM w1.reference_date) as year,
EXTRACT(DOY FROM w1.reference_date) as doy,
w1.receiver_type,
w1.receiver_number,
w1.receiver_version,
......@@ -124,9 +124,8 @@ SELECT
FROM
(SELECT
n.name as network_name,
r.bad,
s.code as station_code,
r.day,
s.marker as station_code,
r.reference_date,
r.receiver_type,
r.receiver_number,
r.receiver_version,
......@@ -135,31 +134,34 @@ FROM
r.antenna_delta_h,
r.antenna_delta_e,
r.antenna_delta_n,
lead(n.name) OVER (ORDER BY code, day ASC) as prev_network_name,
lead(s.code) OVER (ORDER BY code, day ASC) as prev_station_code,
lead(r.receiver_number) OVER (ORDER BY code, day ASC) as prev_receiver_number,
lead(r.receiver_type) OVER (ORDER BY code, day ASC) as prev_receiver_type,
lead(r.receiver_version) OVER (ORDER BY code, day ASC) as prev_receiver_version,
lead(r.antenna_number) OVER (ORDER BY code, day ASC) as prev_antenna_number,
lead(r.antenna_type) OVER (ORDER BY code, day ASC) as prev_antenna_type,
lead(r.antenna_delta_h) OVER (ORDER BY code, day ASC) as prev_antenna_delta_h,
lead(r.antenna_delta_e) OVER (ORDER BY code, day ASC) as prev_antenna_delta_e,
lead(r.antenna_delta_n) OVER (ORDER BY code, day ASC) as prev_antenna_delta_n
lead(n.name) OVER (ORDER BY marker, r.reference_date ASC) as prev_network_name,
lead(s.marker) OVER (ORDER BY marker, r.reference_date ASC) as prev_station_code,
lead(r.receiver_number) OVER (ORDER BY marker, r.reference_date ASC) as prev_receiver_number,
lead(r.receiver_type) OVER (ORDER BY marker, r.reference_date ASC) as prev_receiver_type,
lead(r.receiver_version) OVER (ORDER BY marker, r.reference_date ASC) as prev_receiver_version,
lead(r.antenna_number) OVER (ORDER BY marker, r.reference_date ASC) as prev_antenna_number,
lead(r.antenna_type) OVER (ORDER BY marker, r.reference_date ASC) as prev_antenna_type,
lead(r.antenna_delta_h) OVER (ORDER BY marker, r.reference_date ASC) as prev_antenna_delta_h,
lead(r.antenna_delta_e) OVER (ORDER BY marker, r.reference_date ASC) as prev_antenna_delta_e,
lead(r.antenna_delta_n) OVER (ORDER BY marker, r.reference_date ASC) as prev_antenna_delta_n
from
rinex r
rinex_file r
join
station s
ON r.station_id = s.id
ON r.id_station = s.id
join
station_network sn
ON sn.id_station = s.id
join
network n
ON s.network_id = n.id
ON sn.id_network = n.id
WHERE
n."name" = 'metrica'
AND r.bad = false
--n."name" = 'ALBANIA'
s.marker='PESH'
-- AND s.code = 'afy0'
AND EXTRACT(YEAR FROM day) = 2018
-- AND EXTRACT(YEAR FROM r.reference_date) = 2018
ORDER BY
day DESC) AS W1
r.reference_date DESC) AS W1
WHERE
w1.network_name IS DISTINCT FROM w1.prev_network_name
OR w1.station_code IS DISTINCT FROM w1.prev_station_code
......@@ -172,7 +174,7 @@ WHERE
OR w1.antenna_delta_e IS DISTINCT FROM w1.prev_antenna_delta_e
OR w1.antenna_delta_n IS DISTINCT FROM w1.prev_antenna_delta_n
ORDER BY
w1.network_name, w1.station_code, w1.day ASC
w1.network_name, w1.station_code, w1.reference_date ASC
```
### QUERY DI TRASLATION_TABLE
......
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