diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index f99181b..11d6291 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -34,6 +34,7 @@ _This section is for the PR reviewer_
- [ ] PR links to GitHub issue with mention `Closes #XXXX`
- [ ] Tests pass
- [ ] Checks pass
+- [ ] If the PR changes the SPARQL query template, the default Neurobagel query file has also been [regenerated](https://github.com/neurobagel/api?tab=readme-ov-file#the-default-neurobagel-sparql-query)
For new features:
- [ ] Tests have been added
diff --git a/docs/default_neurobagel_query.rq b/docs/default_neurobagel_query.rq
index 96f4fba..a16904c 100644
--- a/docs/default_neurobagel_query.rq
+++ b/docs/default_neurobagel_query.rq
@@ -4,9 +4,11 @@ PREFIX nbg:
PREFIX ncit:
PREFIX nidm:
PREFIX snomed:
+PREFIX np:
SELECT DISTINCT ?dataset_uuid ?dataset_name ?dataset_portal_uri ?sub_id ?age ?sex
-?diagnosis ?subject_group ?num_matching_phenotypic_sessions ?num_matching_imaging_sessions ?session_id ?session_type ?assessment ?image_modal ?session_file_path ?pipeline_name ?pipeline_version
+?diagnosis ?subject_group ?num_matching_phenotypic_sessions ?num_matching_imaging_sessions
+?session_id ?session_type ?assessment ?image_modal ?session_file_path ?pipeline_name ?pipeline_version
WHERE {
?dataset_uuid a nb:Dataset;
nb:hasLabel ?dataset_name;
@@ -41,6 +43,7 @@ WHERE {
} GROUP BY ?subject
}
+
OPTIONAL {
?session nb:hasCompletedPipeline ?pipeline.
?pipeline nb:hasPipelineVersion ?pipeline_version.