Skip to content

Instantly share code, notes, and snippets.

@sonalkr132
Created February 11, 2019 17:41
Show Gist options
  • Save sonalkr132/8e2a1aa28d3305f252b0dd7f70e65b34 to your computer and use it in GitHub Desktop.
Save sonalkr132/8e2a1aa28d3305f252b0dd7f70e65b34 to your computer and use it in GitHub Desktop.
# select count(distinct r.name) from versions as v join rubygems as r on v.rubygem_id = r.id where v.metadata::jsonb ?| array['homepage_uri', 'changelog_uri', 'source_code_uri', 'documentation_uri', 'wiki_uri', 'mailing_list_uri', 'bug_tracker_uri', 'mailing_list_uri'];
count
-------
1116
(1 row)
gemcutter_development=# select count(*) from rubygems;
count
--------
158380
(1 row)
gemcutter_development=# select count(*) from rubygems where updated_at > now() - interval '1 year';
count
-------
21039
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment