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
Fabianstephany
.
Toggle Highlighting
SQL
SELECT 'Russian' as 'Country', (SELECT COUNT(DISTINCT user_id) FROM ruwiki_p.user) AS 'Number of distinct user ids', SUM(CASE WHEN (proptable.up_property = 'gender') THEN 1 ELSE 0 END) AS 'Number of user with sex information', SUM(CASE WHEN (proptable.up_property = 'gender'and proptable.up_value = 'male') THEN 1 ELSE 0 END) AS 'Number of male user', SUM(CASE WHEN (proptable.up_property = 'gender'and proptable.up_value = 'female') THEN 1 ELSE 0 END) AS 'Number of female user' FROM ruwiki_p.user_properties AS proptable, ruwiki_p.user AS usertable WHERE usertable.user_id=proptable.up_user AND proptable.up_property = 'gender'
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...