# Example SPARQL queries for FashionDB
EXAMPLE_QUERIES = {
# "All fashion houses with country and city": (
# """
# PREFIX wbt:
# PREFIX wb:
# PREFIX pq:
# PREFIX pr:
# PREFIX ps:
# PREFIX p:
# SELECT ?fashion_house ?fashion_houseLabel ?countryLabel ?cityLabel WHERE {
# ?fashion_house wbt:P31 wb:Q783794; # instance of fashion house (example)
# wbt:P17 ?country. # country
# OPTIONAL { ?fashion_house wbt:P131 ?city. } # located in the administrative territorial entity
# SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
# }
# LIMIT 50
# """
# ),
"which designer were born in 1969": (
"PREFIX wbt: \nPREFIX wb: \nPREFIX ps: \nPREFIX pq: \nPREFIX p: \nPREFIX prov: \nPREFIX xsd: \n\nSELECT ?designerLabel ?birthdate WHERE {\n ?designer wbt:P3 ?birthdate .\n FILTER (YEAR(?birthdate) = 1969)\n\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". }\n}"
),
"Which designers studied at Central Saint Martins?": (
"PREFIX wbt: \nPREFIX wb: \nPREFIX pq: \nPREFIX pr: \nPREFIX ps: \nPREFIX p: \nPREFIX prov: \n\nSELECT ?fashion_designerLabel (SAMPLE(?reference_URL) AS ?reference_URL) {\n # Restrict to designers who are instances of fashion designer (Q5)\n\n ?fashion_designer wbt:P2 wb:Q5.\n ?fashion_designer wbt:P9 ?educated_at.\n ?educated_at rdfs:label 'Central Saint Martins'@en . \n\n\n # Retrieve references from the statement\n OPTIONAL {\n ?statement prov:wasDerivedFrom ?reference.\n ?reference pr:P24 ?reference_URL.\n }\n\n # Retrieve labels for the fashion designer\n SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } \n} \nGROUP BY ?fashion_designerLabel \nORDER BY ?fashion_designerLabel"
),
}