Test query b: Difference between revisions
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
{{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | {{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | ||
|schema=Country | |schema=Country | ||
|?states/name | |?states/name=state name | ||
|?states/cities/name | |?states/cities/name=city name | ||
|?states/cities/longitude | |?states/cities/longitude | ||
|format=table | |format=table | ||
| Line 12: | Line 12: | ||
{{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | {{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | ||
|schema=Country | |schema=Country | ||
|?states/name | |?states/name=state name | ||
|?states/cities/name | |?states/cities/name=city name | ||
|?states/cities/longitude | |?states/cities/longitude | ||
|format=table | |format=table | ||
| Line 23: | Line 23: | ||
{{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | {{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]] | ||
|schema=Country | |schema=Country | ||
|?states/name | |?states/name=state name | ||
|?states/cities/name | |?states/cities/name=city name | ||
|?states/cities/longitude | |?states/cities/longitude | ||
|format=table | |format=table | ||
|limit=100 | |limit=100 | ||
}} | }} | ||
Latest revision as of 20:00, 10 August 2025
{{#visualdataquery: [[states/name::+]][[states/cities/longitude::> 40]]
|schema=Country
|?states/name=state name
|?states/cities/name=city name
|?states/cities/longitude
|format=table
|limit=100
}}
SELECT t0.page_id AS `page_id`,t0.value AS `v0`,t1.value AS `v1`,t2.value AS `v2` FROM (SELECT t.value,t.page_id,p.path_no_index,p.path,p.path_parent,p.schema_id FROM `visualdata_text` `t` JOIN `visualdata_props` `p` ON ((p.id=t.prop_id)) WHERE p.schema_id = '3' AND p.path_no_index = 'states/name' ) `t0` LEFT JOIN (SELECT t.value,t.page_id,p.path_no_index,p.path,p.path_parent,p.schema_id FROM `visualdata_numeric` `t` JOIN `visualdata_props` `p` ON ((p.id=t.prop_id)) WHERE p.schema_id = '3' AND p.path_no_index = 'states/cities/longitude' ) `t1` ON (((t1.page_id=t0.page_id) AND (LOCATE( t0.path_parent, t1.path_parent ) = 1))) LEFT JOIN (SELECT t.value,t.page_id,p.path_no_index,p.path,p.path_parent,p.schema_id FROM `visualdata_text` `t` JOIN `visualdata_props` `p` ON ((p.id=t.prop_id)) WHERE p.schema_id = '3' AND p.path_no_index = 'states/cities/name' ) `t2` ON (((t2.page_id=t0.page_id) AND (t2.path_parent = t1.path_parent))) JOIN `page` `page_alias` ON ((page_alias.page_id = t0.page_id)) WHERE ((t0.value IS NOT NULL)) AND ((t1.value > 40)) LIMIT 100