-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert changes in xref release extraction
Not sure why the plars approach doesn't work. It needs fixing and this approach works so we will use it for the release
- Loading branch information
Showing
2 changed files
with
105 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
COPY( | ||
SELECT | ||
rna.id, | ||
xref.upi, | ||
xref.last | ||
FROM xref | ||
JOIN rna | ||
ON | ||
rna.upi = xref.upi | ||
CREATE TEMP TABLE xref_releases AS | ||
SELECT | ||
SELECT | ||
rna.id, | ||
rna.id as rna_id, | ||
xref.upi, | ||
xref.upi, | ||
xref.last | ||
xref.last | ||
FROM xref | ||
FROM xref | ||
JOIN rna | ||
JOIN rna | ||
ON | ||
ON | ||
rna.upi = xref.upi | ||
rna.upi = xref.upi | ||
; | ||
|
||
CREATE INDEX ix_xref_releases_upi ON xref_releases(upi); | ||
|
||
COPY ( | ||
SELECT | ||
rna_id, | ||
upi, | ||
max(last) | ||
from xref_releases | ||
group by rna_id, upi | ||
order by rna_id ASC | ||
|
||
) TO STDOUT (FORMAT CSV) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters