We're building a reporting dashboard on top of our product-review triplestore, and I need a SPARQL query written for one of the first widgets. The goal is to pull all reviews associated with products that have "iPhone" in their name — we want the review ID, title, text, date, and the product name returned.
I've put the ontology definition, sample data, requirements doc, some developer notes, and a few example queries in the workspace. The team has been actively iterating on the schema — the developer notes in docs/ontology_notes.md reflect the most recent decisions from the v2.0 refactor, which may not yet be back-ported to all files. Read through everything carefully before writing the query.
The requirements doc in docs/query_requirements.md spells out what fields to return. Please use FILTER with CONTAINS for the string matching (not REGEX — we want to keep it simple and readable). Make sure the prefix URI matches what the actual ontology data files use.
Save the final query to query_output.sparql. Just the SPARQL query, nothing else in the file.
Additionally, write a second SPARQL query saved to output/filtered_query.sparql that filters the results to show only reviews with an average rating above 3.5, ordered by rating descending. This second query should build on the first and use the same prefix declarations.