Commit 26d8eac5 authored by Sergio Bruni's avatar Sergio Bruni
Browse files

aaa

parent 9b8d63d8
......@@ -942,3 +942,32 @@ 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
```
### cerca i rinex indicizzati per erore piu di una volta su diverse reti (vedi patch_duplicated_rinex_on_db.py)
```
select net,
casi,
(
select count(*) from rinex_file r
join rinex_file_network rn on rn.id_rinex_file = r.id
where rn.id_network = net_id
) totale_rinex
from (
select net,
count(*) as casi,
max(net_id) net_id
from (
select r.name, rn.id_network, max(n.name) net, max(n.id) net_id from rinex_file r
join rinex_file_network rn ON rn.id_rinex_file = r.id
join network n on n.id=rn.id_network
group by r.name, rn.id_network
having count(*) > 1
order by r.name
) t
group by net
) f
order by casi
```
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