q-opt-3.rq
来自「Jena推理机」· RQ 代码 · 共 25 行
RQ
25 行
# An optional and an fixed pattern
PREFIX : <http://example.org/>
# Ensure an optional does not mask a later one.
# This query works unreordered because it has written out the needed UNION
SELECT *
WHERE
{
:x :p ?v .
OPTIONAL {:y ?p ?a }
OPTIONAL {:z ?p ?v }
}
## SELECT DISTINCT *
## {
## :x :p ?v .
## { OPTIONAL {:y ?p ?a } OPTIONAL {:z ?p ?v } }
## UNION
## { OPTIONAL {:z ?p ?v } OPTIONAL {:y ?p ?a } }
## }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?