=Results=
//all as of 16 November 2016//
* **Wikipedia**: 42.48 million articles licensed as CC-BY-SA 3.0 (100% of Wikipedia articles)
* **Wikidata**: 24.51 million structured data items licensed as CC-0 (100% of Wikidata items)
* **Wikimedia Commons**:
* **Wiktionary**: 25.92 million dictionary entries licensed as CC-BY-SA 3.0 (100% of Wiktionary entries)
=Queries=
```
select database() as wiki, ss_good_articles as articles
from site_stats;
```
```
multiquery ~/queries/num_articles.sql -h analytics-store.eqiad.wmnet -d ~/dblists/wikipedias.tsv --defaults-file=/etc/mysql/conf.d/analytics-research-client.cnf > ~/data/wikipedia_articles.tsv
```
```
multiquery ~/queries/num_articles.sql -h analytics-store.eqiad.wmnet -d ~/dblists/wiktionaries.tsv --defaults-file=/etc/mysql/conf.d/analytics-research-client.cnf > ~/data/wiktionary_entries.tsv
```
```
select license, count(*) as files
from
(select
case
when cats like '%CC-BY-NC-ND%' then 'CC-BY-NC-ND'
when cats like '%CC-BY-NC-SA%' then 'CC-BY-NC-SA'
when cats like '%CC-BY-ND%' then 'CC-BY-ND'
when cats like '%CC-BY-SA%' then 'CC-BY-SA'
when cats like '%CC-BY-NC%' then 'CC-BY-NC'
when cats like '%CC-BY%' then 'CC-BY'
when cats like '%CC-SA%' then 'CC-SA'
when cats like '%CC-Zero%' then 'CC-0'
when cats like '%CC-PD%' then 'CC-PD'
else 'Other CC'
end as license
from
(select cl_from, group_concat(cl_to) as cats
from categorylinks
inner join
(select cat_title from category where
cat_title like 'CC-%' and
cat_title not like '%aircraft%' and
cat_title not regexp 'CC-[[:upper:][:digit:]]{3}'
) cc_cats
on cat_title = cl_to
where cl_type = file
group by cl_from
) cc_files
) licenses
group by license;
```