Test query b

From Wikisphere
Revision as of 07:33, 14 August 2025 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
NameRegioncategories
AfghanistanAsiaTest cat a
Aland IslandsEuropeTest cat a
American SamoaOceaniaTest cat b
British Indian Ocean TerritoryAfrica 
EritreaAfrica 
French Southern TerritoriesAfrica 
HaitiAmericas 
ItalyEurope 
KuwaitAsia 
LithuaniaEurope 
MauritaniaAfrica 
MauritiusAfrica 
Palestinian Territory OccupiedAsia 
Pitcairn IslandOceania 
Saint Kitts And NevisAmericas 
SwitzerlandEurope 
United Arab EmiratesAsia 
United KingdomEurope 
United StatesAmericas 
United States Minor Outlying IslandsAmericas 
Vatican City State (Holy See)Europe 
Virgin Islands (British)Americas 

SELECT t0.page_id AS `page_id`,t0.value AS `v0`,t1.value AS `v1`,GROUP_CONCAT(categorylinks_t0.cl_to SEPARATOR 0x1E) AS `categories` FROM (SELECT t.page_id,p.path_parent,t.value FROM `visualdata_text` `t` JOIN `visualdata_props` `p` ON ((p.id=t.prop_id)) WHERE p.schema_id = '3' AND p.path_no_index = 'name' ) `t0` LEFT JOIN (SELECT t.page_id,p.path_parent,t.value FROM `visualdata_text` `t` JOIN `visualdata_props` `p` ON ((p.id=t.prop_id)) WHERE p.schema_id = '3' AND p.path_no_index = 'region' ) `t1` ON (((t1.page_id=t0.page_id) AND (t1.path_parent = t0.path_parent))) LEFT JOIN `categorylinks` `categorylinks_1` ON (((categorylinks_1.cl_from = t0.page_id) AND ((CONVERT(categorylinks_1.cl_to USING utf8mb4) COLLATE utf8mb4_general_ci LIKE '%it%' ESCAPE '`')))) JOIN `page` `page_alias` ON ((page_alias.page_id = t0.page_id)) LEFT JOIN `categorylinks` `categorylinks_t0` ON ((t0.page_id = categorylinks_t0.cl_from)) WHERE ((t0.value IS NOT NULL)) AND ((t0.value LIKE '%it%' ESCAPE '`') OR (t1.value LIKE '%it%' ESCAPE '`') OR (t0.page_id = categorylinks_1.cl_from)) GROUP BY t0.page_id, t0.value, t1.value LIMIT 100