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::nearest_stellar_hosts::META,
    table: InsightTable::StellarHosts,
    sql: r#"
        SELECT hostname, MIN(sy_dist) AS sy_dist, MAX(st_teff) AS st_teff, MAX(st_mass) AS st_mass, MAX(sy_pnum) AS sy_pnum
        FROM stellarhosts
        WHERE hostname IS NOT NULL
          AND hostname != ''
          AND sy_dist IS NOT NULL
        GROUP BY hostname
        ORDER BY sy_dist ASC, hostname ASC
        LIMIT 10
    "#,
};