File tree Expand file tree Collapse file tree 4 files changed +34
-19
lines changed Expand file tree Collapse file tree 4 files changed +34
-19
lines changed Original file line number Diff line number Diff line change 33 first_name,
44 last_name,
55 birth_date,
6- (DATE ' 2023-02-12 ' - birth_date) / 365 AS age
6+ (( DATE ' 2023-10-14 ' - birth_date) / 365 ) AS age
77FROM
88 employees
99
10- -- Generated by PRQL compiler version:0.5.0 target:sql.duckdb (https://prql-lang.org)
10+ -- Generated by PRQL compiler version:0.9.1 target:sql.duckdb (https://prql-lang.org)
Original file line number Diff line number Diff line change 88ORDER BY
99 birth_date
1010
11- -- Generated by PRQL compiler version:0.5.0 target:sql.duckdb (https://prql-lang.org)
11+ -- Generated by PRQL compiler version:0.9.1 target:sql.duckdb (https://prql-lang.org)
Original file line number Diff line number Diff line change 1- WITH table_1 AS (
2- SELECT
3- * ,
4- ROW_NUMBER() OVER (
5- PARTITION BY title
6- ORDER BY
7- hire_date
8- ) AS _expr_0
9- FROM
10- employees
11- )
121SELECT
13- * EXCLUDE (_expr_0)
2+ DISTINCT ON (title) *
143FROM
15- table_1
16- WHERE
17- _expr_0 <= 1
4+ employees
5+ ORDER BY
6+ title,
7+ hire_date
188
19- -- Generated by PRQL compiler version:0.5.0 target:sql.duckdb (https://prql-lang.org)
9+ -- Generated by PRQL compiler version:0.9.1 target:sql.duckdb (https://prql-lang.org)
Original file line number Diff line number Diff line change 1+ WITH table_0 AS (
2+ SELECT
3+ *
4+ from
5+ read_parquet(
6+ " s3://gbif-open-data-us-east-1/occurrence/2023-03-01/occurrence.parquet/000000"
7+ )
8+ )
9+ SELECT
10+ genus,
11+ species,
12+ COUNT (* ) AS total
13+ FROM
14+ table_0
15+ WHERE
16+ genus = ' Anas'
17+ GROUP BY
18+ genus,
19+ species
20+ ORDER BY
21+ total DESC
22+ LIMIT
23+ 10
24+
25+ -- Generated by PRQL compiler version:0.9.1 target:sql.duckdb (https://prql-lang.org)
You can’t perform that action at this time.
0 commit comments