Skip to content

Instantly share code, notes, and snippets.

@jonstorer
Created January 22, 2013 22:10
Show Gist options
  • Save jonstorer/4599017 to your computer and use it in GitHub Desktop.
Save jonstorer/4599017 to your computer and use it in GitHub Desktop.
This is what I used to get my localizations back when I deleted them from copycopter
select * from versions, (select max(versions.id) as id from versions left outer join localizations on localizations.id = versions.localization_id where localizations.id is null group by versions.localization_id) as x where versions.id = x.id and versions.created_at > to_date('2012-03-18', 'yyyy-mm-dd') and versions.number != 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment