Fork of Untitled query #75197 by لوقا
This query is marked as a draft This query has been published by حبيشان.

SQL

AخA
 
select SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(REPLACE(REPLACE(REPLACE(el_to,"al-maktaba.org","shamela.ws"),"index.php/",""),"https://shamela.ws/book/",""),"https://shamela.ws/browse.php/book-",""), "/", 1), "#", 1) as bookid, 
count(*) as bookcount from externallinks
inner join page on page.page_id = externallinks.el_from
where (el_to like "https://shamela.ws%/book%" or el_to like "https://al-maktaba.org%/book%")
and page.page_namespace in (0) 
and page.page_is_redirect = 0
group by bookid;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...