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
Peter Bowman
.
lista page_id stron z przestrzeni Strona do których są linki ze stron z przestrzeni Indeks (jako pagelinks lub jako templatelinks), ale tylko z tych stron z przestrzeni indeks, które linkują do "Autor:Józef Ignacy Kraszewski" (jako pagelink)
Toggle Highlighting
SQL
set @ns_strona = 100; set @ns_indeks = 102; set @target_ns = 104; set @target_title = "Józef_Ignacy_Kraszewski"; select p_strona.page_id, p_strona.page_title from page as p_strona left join linktarget as linktarget_strona on linktarget_strona.lt_namespace = @ns_strona and linktarget_strona.lt_title = p_strona.page_title left join templatelinks as templatelinks_strona on templatelinks_strona.tl_target_id = linktarget_strona.lt_id left join pagelinks as pagelinks_strona on pagelinks_strona.pl_namespace = @ns_strona and pagelinks_strona.pl_title = p_strona.page_title where (templatelinks_strona.tl_from is not null and templatelinks_strona.tl_from_namespace = @ns_indeks and exists ( select page_id from pagelinks as pagelinks_tl where pagelinks_tl.pl_from = templatelinks_strona.tl_from and pagelinks_tl.pl_namespace = @target_ns and pagelinks_tl.pl_title = @target_title )) or (pagelinks_strona.pl_from is not null and pagelinks_strona.pl_from_namespace = @ns_indeks and exists ( select page_id from pagelinks as pagelinks_pl where pagelinks_pl.pl_from = pagelinks_strona.pl_from and pagelinks_pl.pl_namespace = @target_ns and pagelinks_pl.pl_title = @target_title )) ;
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...