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
Glocont
.
Toggle Highlighting
SQL
SELECT p.page_title AS name, CASE WHEN p.page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'gender' AND pp_value = 'male' ) THEN 'male' WHEN p.page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'gender' AND pp_value = 'female' ) THEN 'female' ELSE NULL END AS gender, p.page_title AS place_of_birth, -- Assuming place of birth is the same as name FROM_UNIXTIME(rv.rev_timestamp) AS date_of_birth, FROM_UNIXTIME(dv.rev_timestamp) AS date_of_death, CASE WHEN p.page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'deathplace' ) THEN ( SELECT pp_value FROM page_props WHERE pp_page = p.page_id AND pp_propname = 'deathplace' ) ELSE NULL END AS place_of_death, 'occupation' AS occupation, -- Replace 'occupation' with the actual field name for occupation 'awards_and_accomplishments' AS awards_and_accomplishments, -- Replace 'awards_and_accomplishments' with the actual field name for awards and accomplishments 'wikidata_code' AS wikidata_code -- Replace 'wikidata_code' with the actual field name for Wikidata code FROM page p JOIN categorylinks cl ON p.page_id = cl.cl_from JOIN revision rv ON p.page_latest = rv.rev_id LEFT JOIN revision dv ON p.page_id = dv.rev_page AND p.page_id IN ( SELECT pp_page FROM page_props WHERE pp_propname = 'death' ) WHERE cl.cl_to = 'Nacidos_en_Galicia' ORDER BY date_of_birth;
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...