diff --git a/docs/advanced.rst b/docs/advanced.rst
index c5eebbd4eebe14f3bcd67abb8c59a5b8f1909f8b..d8119821a9a42e61a6846daa95b02aaf151517bf 100644
--- a/docs/advanced.rst
+++ b/docs/advanced.rst
@@ -174,7 +174,7 @@ will return all completed workflows that have name *The coffee workflow*. The
 empty selection means that no firework and no firework updates are selected.
 This query is started with the command:: 
 
-  lpad_query -o yaml query -f query_sample_1.yaml
+  lpad_query -o yaml -f query_sample_1.yaml
 
 If, supposed, we have one workflow with that name and it is completed the output
 is::