softwareheritage=> select lang, count, percent from swh_content_language_repartition(); | lang | count | percent | |---------------------+---------+---------| | python | 1130544 | 16.1095 | | javascript+lasso | 1078207 | 15.3637 | | c | 706431 | 10.0662 | | unknown | 665657 | 9.4852 | | css+lasso | 656440 | 9.3538 | | xml | 524764 | 7.4775 | | objective-c | 340457 | 4.8513 | | javascript+php | 338407 | 4.8221 | | html | 224124 | 3.1936 | | c++ | 175327 | 2.4983 | | perl6 | 165176 | 2.3536 | | prolog | 145120 | 2.0679 | | rexx | 81382 | 1.1596 | | genshi | 78082 | 1.1126 | | velocity | 57813 | .8238 | | swig | 51430 | .7328 | | makefile | 47717 | .6799 | | mason | 45450 | .6476 | | bash | 41872 | .5966 | | vb.net | 36728 | .5233 | | perl | 35840 | .5107 | | restructuredtext | 35284 | .5028 | | xml+django/jinja | 35145 | .5008 | | ini | 29649 | .4225 | | scalate-server-page | 28918 | .4121 | | numpy | 23422 | .3337 | | actionscript-3 | 22484 | .3204 | | jasmin | 21424 | .3053 | | xml+php | 21051 | .3000 | | nix | 20153 | .2872 | | erb | 17455 | .2487 | | django/jinja | 17346 | .2472 | | xml+ruby | 13787 | .1965 | | objective-j | 13172 | .1877 | | s | 11591 | .1652 | | smali | 8764 | .1249 | | coq | 8260 | .1177 | | ruby | 8012 | .1142 | | html+php | 7323 | .1043 | | gas | 7061 | .1006 | | smarty | 6129 | .0873 | | lasso | 4798 | .0684 | | matlab | 4737 | .0675 | | groff | 4631 | .0660 | | hy | 3853 | .0549 | | html+django/jinja | 3193 | .0455 | | diff | 1722 | .0245 | | xml+smarty | 1378 | .0196 | | rhtml | 1202 | .0171 | | xml+lasso | 1085 | .0155 | | cmake | 1083 | .0154 | | php | 1072 | .0153 | | dtd | 1051 | .0150 | | javascript | 737 | .0105 | | xslt | 671 | .0096 | | logos | 647 | .0092 | | html+genshi | 542 | .0077 | | debian-sourcelist | 476 | .0068 | | python-3 | 468 | .0067 | | tex | 236 | .0034 | | viml | 228 | .0032 | | html+smarty | 129 | .0018 | | http | 120 | .0017 | | html+lasso | 106 | .0015 | | qbasic | 87 | .0012 | | xml+velocity | 46 | .0007 | | aspx-vb | 45 | .0006 | | groovy | 39 | .0006 | | julia | 38 | .0005 | | coffeescript | 13 | .0002 | | logtalk | 10 | .0001 | | text-only | 8 | .0001 | | sql | 3 | .0000 | | rebol | 3 | .0000 | | reg | 3 | .0000 | | common-lisp | 2 | .0000 | | tcl | 1 | .0000 | | go | 1 | .0000 | | yaml | 1 | .0000 | | apacheconf | 1 | .0000 | | erlang | 1 | .0000 | | css | 1 | .0000 | # sql softwareheritage=> select count(*) from content_language; count --------- 3410460 (1 row) create type swh_content_language_repartition_signature as ( lang languages, count bigint, percent text ); create or replace function swh_content_language_repartition() returns setof swh_content_language_repartition_signature language plpgsql as $$ declare total real; begin select count(id) from content_language into total; return query select lang, count(id) as count, to_char((100.0 * count(id) / total), '999.99') as percent from content_language group by lang order by count desc; end $$;