Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Lucas Werkmeister (WMDE)
.
Due to T166227, users can create properties with invalid datatypes on Wikidata. This query checks if anyone has actually done that.
Toggle Highlighting
SQL
USE `wikidatawiki_p`; # which pi_types exist in the database? SELECT `pi_type` FROM `wb_property_info` GROUP BY `pi_type`; # which types are inside pi_info in the database? SELECT `pi_info` FROM `wb_property_info` GROUP BY `pi_info`; # download this result set as TSV and pipe it into: # tail -n+2 | sed 's|\r$||; s|^"\(.*\)"$|\1|; s|""|"|g' | jq -r .type | sort | uniq -c | sort -nr | tee >(wc -l) # result: there don’t seem to be any property types in the database other than the expected twelve.
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...