mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-11-04 00:33:55 +01:00 
			
		
		
		
	Made changes to the query
This commit is contained in:
		
							parent
							
								
									8be9deb5d0
								
							
						
					
					
						commit
						3e9c3a6dae
					
				
					 3 changed files with 4 additions and 22 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
SELECT
 | 
			
		||||
  ?item
 | 
			
		||||
  (SAMPLE(?label) AS ?label)
 | 
			
		||||
  (SAMPLE(?class) AS ?class)
 | 
			
		||||
  (SAMPLE(?description) AS ?description)
 | 
			
		||||
  (SAMPLE(?classLabel) AS ?classLabel)
 | 
			
		||||
  (SAMPLE(?pic) AS ?pic)
 | 
			
		||||
| 
						 | 
				
			
			@ -34,6 +35,9 @@ WHERE {
 | 
			
		|||
    BIND(COALESCE(?classLabelPreferredLanguage, ?classLabelAnyLanguage, "?") as ?classLabel)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  OPTIONAL {
 | 
			
		||||
  ?item p:P31/ps:P31 ?class.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  # Get picture
 | 
			
		||||
  OPTIONAL {?item wdt:P18 ?pic}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,6 @@
 | 
			
		|||
SELECT
 | 
			
		||||
  ?item
 | 
			
		||||
  (SAMPLE(?location) as ?location)
 | 
			
		||||
  (SAMPLE(?class) AS ?class)
 | 
			
		||||
  (SAMPLE(?destroyed) AS ?destroyed)
 | 
			
		||||
  (SAMPLE(?endTime) AS ?endTime)
 | 
			
		||||
WHERE {
 | 
			
		||||
  # Around given location
 | 
			
		||||
  SERVICE wikibase:box {
 | 
			
		||||
| 
						 | 
				
			
			@ -12,13 +9,5 @@ WHERE {
 | 
			
		|||
     bd:serviceParam wikibase:cornerEast "Point(${LONG_EAST} ${LAT_EAST})"^^geo:wktLiteral.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  OPTIONAL {
 | 
			
		||||
  ?item p:P31/ps:P31 ?class.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  # Get existence
 | 
			
		||||
  OPTIONAL {?item wdt:P576 ?destroyed}
 | 
			
		||||
  OPTIONAL {?item wdt:P582 ?endTime}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
GROUP BY ?item
 | 
			
		||||
| 
						 | 
				
			
			@ -1,9 +1,6 @@
 | 
			
		|||
SELECT
 | 
			
		||||
  ?item
 | 
			
		||||
  (SAMPLE(?location) as ?location)
 | 
			
		||||
  (SAMPLE(?class) AS ?class)
 | 
			
		||||
  (SAMPLE(?destroyed) AS ?destroyed)
 | 
			
		||||
  (SAMPLE(?endTime) AS ?endTime)
 | 
			
		||||
  (SAMPLE(?monument) AS ?monument)
 | 
			
		||||
WHERE {
 | 
			
		||||
  # Around given location
 | 
			
		||||
| 
						 | 
				
			
			@ -13,14 +10,6 @@ WHERE {
 | 
			
		|||
       bd:serviceParam wikibase:cornerEast "Point(${LONG_EAST} ${LAT_EAST})"^^geo:wktLiteral.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  OPTIONAL {
 | 
			
		||||
  ?item p:P31/ps:P31 ?class.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  # Get existence
 | 
			
		||||
  OPTIONAL {?item wdt:P576 ?destroyed}
 | 
			
		||||
  OPTIONAL {?item wdt:P582 ?endTime}
 | 
			
		||||
 | 
			
		||||
  # Wiki Loves Monuments
 | 
			
		||||
  OPTIONAL {?item p:P1435 ?monument}
 | 
			
		||||
  OPTIONAL {?item p:P2186 ?monument}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue