#v5
#defaultView:Map
SELECT
  ?pamatka
  ?pamatkaLabel
  ?pam_katalog_cislo
  ?datum_vzniku
  (SAMPLE(?typLabel) AS ?typLabel)
  (SAMPLE(?geo) AS ?geo)
  (SAMPLE (?obrazek) AS ?obrazek)
WHERE {
  ?pamatka wdt:P4075 ?pam_katalog_cislo.
  ?pamatka wdt:P131+ wd:Q188373.
  ?pamatka wdt:P625 ?geo.
  ?pamatka wdt:P31 ?typ.
  OPTIONAL { ?pamatka wdt:P18 ?obrazek. }
  # OPTIONAL { ?pamatka wdt:P1448 ?ofic_nazez. } # Frequent duplicates
  OPTIONAL { ?pamatka wdt:P571 ?datum_vzniku. }
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "cs,en".
    ?pamatka rdfs:label ?pamatkaLabel .
    ?typ rdfs:label ?typLabel .
  } 
}
GROUP BY ?pamatka ?pamatkaLabel ?pam_katalog_cislo ?datum_vzniku


#v4
#defaultView:Map
SELECT ?pamatka ?pamatkaLabel ?pam_katalog_cislo (SAMPLE(?geo) AS ?geo) (SAMPLE (?obrazek) AS ?obrazek) (SAMPLE(?typ) AS ?typ) ?datum_vzniku WHERE {
  ?pamatka wdt:P4075 ?pam_katalog_cislo.
  ?pamatka wdt:P131+ wd:Q188373.
  ?pamatka wdt:P625 ?geo.
  ?pamatka wdt:P31 ?typ.
  OPTIONAL { ?pamatka wdt:P18 ?obrazek. }
  # OPTIONAL { ?pamatka wdt:P1448 ?ofic_nazez. } # Frequent duplicates
  OPTIONAL { ?pamatka wdt:P571 ?datum_vzniku. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". } 
}
GROUP BY ?pamatka ?pamatkaLabel ?pam_katalog_cislo ?datum_vzniku


#v3
#defaultView:Map
SELECT ?pamatka ?pamatkaLabel ?pam_katalog_cislo (SAMPLE(?geo) AS ?geo) (SAMPLE (?obrazek) AS ?obrazek) ?datum_vzniku WHERE {
  ?pamatka wdt:P4075 ?pam_katalog_cislo.
  ?pamatka wdt:P131+ wd:Q188373.
  ?pamatka wdt:P625 ?geo.
  OPTIONAL { ?pamatka wdt:P18 ?obrazek. }
  # OPTIONAL { ?pamatka wdt:P1448 ?ofic_nazez. } # Frequent duplicates
  OPTIONAL { ?pamatka wdt:P571 ?datum_vzniku. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". } 
}
GROUP BY ?pamatka ?pamatkaLabel ?pam_katalog_cislo ?datum_vzniku


#v2
#defaultView:Map
SELECT ?pamatka ?pamatkaLabel ?pam_katalog_cislo ?geo ?obrazek ?datum_vzniku WHERE {
  ?pamatka wdt:P4075 ?pam_katalog_cislo.
  ?pamatka wdt:P131+ wd:Q188373.
  ?pamatka wdt:P625 ?geo.
  OPTIONAL { ?pamatka wdt:P18 ?obrazek. }
  # OPTIONAL { ?pamatka wdt:P1448 ?ofic_nazez. } # Frequent duplicates
  OPTIONAL { ?pamatka wdt:P571 ?datum_vzniku. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "cs,en". } 
}