Skip to content

Commit

Permalink
Maybe try this?
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Aug 2, 2023
1 parent 8637658 commit 944bd03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sql/unique_python_files.prql
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ prql target:sql.duckdb
from (read_parquet $1)
filter s"suffix({path}, '.py')"
filter skip_reason == ""
select {s"distinct on({hash}) {hash}", path, repository, uploaded_on}
sort {uploaded_on}
group {hash} (
sort {uploaded_on}
take 1
select {hash, path, repository, uploaded_on}
)
select {hash, path, uploaded_on} | sort {path}

0 comments on commit 944bd03

Please sign in to comment.