SPARQL Query for Competancy Question 1: PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cls: PREFIX cmns-rt: PREFIX oe2022-dogs: SELECT ?breed WHERE { ?breed a oe2022-dogs:Breed. ?profile a oe2022-dogs:BreedCharacteristicProfile; cmns-cls:characterizes ?breed; oe2022-dogs:displaysChildFriendlinessLevel ?childfriendlinesslevel; oe2022-dogs:displaysExerciseNeedsLevel ?exerciseneedslevel; Filter(?childfriendlinesslevel = 1.0 && ?exerciseneedslevel > 0.5). } ORDER BY ASC(?childfriendlinesslevel) ASC(?exerciseneedslevel) SPARQL Query for Competancy Question 4: PREFIX rdfs: PREFIX oe2022-dogs: PREFIX oe2022-dogs-ind: PREFIX cmns-col: select ?breedLabel ?fulfillsKidRequirement ?fulfillsDogRequirement ?fulfillsCatRequirement where { bind( (oe2022-dogs-ind:Question4Family) as ?family) bind( (oe2022-dogs-ind:Greyhound) as ?breed) ?breed rdfs:label ?breedLabel . bind( if(exists{?family a oe2022-dogs:FamilyWithSmallChildren}, oe2022-dogs:GoodForChildrenBreed, oe2022-dogs:Breed) as ?needsToBeGoodWithKids) bind( if(exists{?family oe2022-dogs:ownsPet ?dog . ?dog a oe2022-dogs:Dog .}, oe2022-dogs:DogFriendlyBreed, oe2022-dogs:Breed) as ?needsToBeDogFriendly) bind( if(exists{?family oe2022-dogs:ownsPet ?cat . ?cat a oe2022-dogs:Cat .}, oe2022-dogs:CatFriendlyBreed, oe2022-dogs:Breed) as ?needsToBeCatFriendly) bind( if(exists{?breed a ?needsToBeGoodWithKids}, "Yes", "No") as ?fulfillsKidRequirement) bind( if(exists{?breed a ?needsToBeDogFriendly}, "Yes", "No") as ?fulfillsDogRequirement) bind( if(exists{?breed a ?needsToBeCatFriendly}, "Yes", "No") as ?fulfillsCatRequirement) } [Is a greyhound a good breed for a large family with multiple pets, including cats and other dogs?] This query is specifically using the family in competancy question 4 and seeing if a greyhound is an appropriate dog for them. It returns whether or not the breed is a good fit based on some of the potential characteristic of the family: since it's a large family we use good with kids (inferred based on playfullness and child safety values), good with other dogs (inferred based on dog friendliness value), and good with cats (inferred based on cat friendliness value). SPARQL Query for Competancy Question 5: Question: What is a cute dog breed that can do well in an apartment that doesn’t get cleaned very often? Explanation: Query first requires apartment friendly characteristics (which will require a low barking, high stranger friendliness level, and a small or medium sized breed). It also requires that the dog have low shedding and drooling to account for the lack of cleaning in this apartment. It prioritizes our hard apartment constraints (barking and stranger friendliness) but ranks by popularity to account for the "cuteness" expectation Sample answer: Poodle PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX cmns-cls: PREFIX cmns-rt: PREFIX oe2022-dogs: SELECT ?label ?popularityQuantitativeScore ?barkinglevel ?strangerFriendliness ?sheddinglevel ?droolinglevel ?maxWeight WHERE { ?breed a oe2022-dogs:ApartmentFriendlyBreed; a oe2022-dogs:LowSheddingBreed; a oe2022-dogs:LowDroolingBreed; rdfs:label ?label. ?char_profile a oe2022-dogs:BreedCharacteristicProfile; cmns-cls:characterizes ?breed; oe2022-dogs:displaysDroolingLevel ?droolinglevel; oe2022-dogs:displaysSheddingLevel ?sheddinglevel; oe2022-dogs:displaysBarkingLevel ?barkinglevel; oe2022-dogs:displaysStrangerFriendlinessLevel ?strangerfriendlinesslevel. ?phys_profile a oe2022-dogs:BreedPhysicalProfile; cmns-cls:characterizes ?breed; oe2022-dogs:hasMaxWeight ?maxWeight. ?popularityRating a oe2022-dogs:BreedPopularityRating; cmns-rt:rates ?breed; cmns-rt:hasRatingScore ?ratingScore. ?ratingScore cmns-rt:hasMeasureWithinScale ?popularityQuantitativeScore. } ORDER BY ?popularityQuantitativeScore ?barkinglevel DESC(?strangerfriendlinesslevel) ?sheddinglevel ?droolinglevel LIMIT 10