Skip to content

Instantly share code, notes, and snippets.

@mcantelon
Created May 12, 2014 21:35
Show Gist options
  • Save mcantelon/5e2f09c753c7ec6d96bc to your computer and use it in GitHub Desktop.
Save mcantelon/5e2f09c753c7ec6d96bc to your computer and use it in GitHub Desktop.
SELECT Related.originalLocation AS 'derivedFromOriginalLocation',
Current.originalLocation, Current.sipUUID
FROM Files AS Current
LEFT OUTER JOIN Derivations ON Current.fileUUID = Derivations.derivedFileUUID
LEFT OUTER JOIN Files AS Related ON Derivations.sourceFileUUID = Related.fileUUID
WHERE Current.removedTime = 0
AND Current.currentLocation like '%transfer-AAAA%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment