use anyhow::Result; use queryer_sql_polars::query; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt::init(); let url = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/latest/owid-covid-latest.csv"; // 使用 sql 从 URL 里获取数据 let sql = format!( "SELECT location name, total_cases, new_cases, total_deaths, new_deaths \ FROM {} where new_deaths >= 200 ORDER BY new_cases DESC", url ); println!("{sql}"); let df = query(sql, "csv").await?; println!("{:?}", df); Ok(()) }