INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='GroupOrUnionGraphPattern-union'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12b.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-8.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-8.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/filter-placement-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/filter-scope-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-scope-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/opt-filter-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/bound/bound1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-bound'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bound/bound1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/sameTerm-not-eq.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-sameTerm'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalAndExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-not-eq.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional-filter/expr-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-complex-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spopo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNode-rANON'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-3.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/regex/regex-query-001.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='RegexExpression'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-001.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/regex/regex-query-002.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='RegexExpression-flags'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-002.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/regex/regex-query-003.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='RegexExpression'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-003.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-01.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-02.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-11.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-11.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='OrderClause-1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-ASC'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-3.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-DESC'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-function.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='OrderClause-1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-noSC'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-function.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rFunctionCall'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-6.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-6.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-langMatches-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-langMatches'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-langMatches-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-langMatches'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-langMatches-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-langMatches'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-langMatches-de-de.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-langMatches'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-de-de.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional-filter/expr-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-complex-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='GroupOrUnionGraphPattern-union'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spopo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNode-rANON'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-2.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-complex-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='GroupOrUnionGraphPattern-union'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spopo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNode-rANON'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-4.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-cmp-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-gt'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-datatype-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-datatype-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-langMatches-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-langMatches'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-langMatches-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional-filter/expr-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/regex/regex-query-004.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='RegexExpression'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/regex/regex-query-004.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-cmp-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-gt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-cmp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-datatype-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-datatype-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-lang-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='String-singleQuote'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-lang-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='String-singleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-lang'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/date-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/date-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/date-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-gt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/date-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/date-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-05.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-06.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-06.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalAndExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-str-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-str-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-str-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-str-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-str-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-byte-short-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-byte-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-byte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-decimal-decimal.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-decimal-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-double-decimal-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-double-decimal.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-double-double.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-double-float-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-double-float.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-double-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-float-decimal-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-float-decimal.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-float-float.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-float-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-int-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-int-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-integer-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-integer-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-long-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-long-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-negativeInteger-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-negativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-nonNegativeInteger-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonNegativeInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-nonPositiveInteger-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-nonPositiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-positiveInteger-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-positiveInteger-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-byte-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-byte-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-decimal.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-decimal.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-double.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-double.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-float.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-float.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-int-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-int-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-long-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-long-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-short-fail.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short-fail.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-short-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-short-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-unsignedByte-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedByte-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-unsignedInt-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedInt-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-unsignedLong-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedLong-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/type-promotion/tP-unsignedShort-short.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-yes'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/type-promotion/tP-unsignedShort-short.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-bool.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-bool'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-bool.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-dT.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-dT'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dT.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-dbl.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-dbl'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dbl.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-dec.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-dec'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-dec.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-flt.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-flt'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-flt.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-int.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-int'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-int.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/cast/cast-str.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-datatype'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-cast-str'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-function'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/cast/cast-str.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-12.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-default'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-noWhere'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-bound'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-12.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional-filter/expr-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-bound'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalOrExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBrackettedExpression'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional-filter/expr-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-nonDefault'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-plain'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalAndExpression-n'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-lt'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rRDFLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rNumericLiteral'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional-filter/expr-4.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
