diff --git a/sql/unique_python_files.prql b/sql/unique_python_files.prql index 65205b5a..f6a62d75 100644 --- a/sql/unique_python_files.prql +++ b/sql/unique_python_files.prql @@ -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} \ No newline at end of file +group {hash} ( + sort {uploaded_on} + take 1 + select {hash, path, repository, uploaded_on} +) +select {hash, path, uploaded_on} | sort {path}