You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT mmsi as tm FROM spire_vessel_positions WHEREtimestamp>'2023-06-17'GROUP BY mmsi
More recent timestamp scrapped since last update
SELECT tm,array_agg(mmsi) FROM (SELECT mmsi,max(timestamp) as tm FROM spire_vessel_positions WHEREtimestamp>'2023-06-17'GROUP BY mmsi) as foo GROUP BY tm
mmsi not scrapped by Spire
SELECT mmsi FROM vessels WHERE mmsi IS NOT NULLAND mmsi NOT IN (SELECT mmsi as tm FROM spire_vessel_positions WHEREtimestamp>'2023-06-17'GROUP BY mmsi)
number of distincte position per boat which has more than 1000 positions gathered
SELECT*FROM (SELECTCOUNT(*) as sum_position,mmsi FROM (SELECT DISTINCT position,mmsi FROM spire_vessel_positions) as foo GROUP BY mmsi) as bar WHERE sum_position >1000