exodata-core 0.1.0

Core data loading, metadata, insight, and table logic for Exoplanets Catalog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::{InsightDef, InsightTable};

pub const DEF: InsightDef = InsightDef {
    meta: &exo_types::insights::crowded_systems::META,
    table: InsightTable::StellarHosts,
    sql: r#"
        SELECT sy_name, MIN(hostname) AS host_link_hostname, MAX(sy_pnum) AS sy_pnum, MAX(sy_snum) AS sy_snum, MIN(sy_dist) AS sy_dist
        FROM stellarhosts
        WHERE sy_name IS NOT NULL
          AND sy_name != ''
          AND sy_pnum IS NOT NULL
        GROUP BY sy_name
        ORDER BY sy_pnum DESC, sy_name ASC
        LIMIT 10
    "#,
};