CREATE TABLE feature (pk int unsigned not null  auto_increment primary key, name VARCHAR(127), description VARCHAR(255), UNIQUE u_name(name));
INSERT INTO feature (name, description) VALUES ('AskQueries', 'ASK query form'), ('BasicGraphPatterns', 'Basic graph pattern matching. Triple pattern constructs. Blank node scoping'), ('ConstructQueries', 'CONSTRUCT query form'), ('CoreSPARQL', 'Core bits of SPARQL. Prefixed names, variables, blank nodes, graph terms'), ('Datasets', 'RDF datasets. Default and named graphs. GRAPH keyword'), ('Filters', 'FILTER clauses and expressions'), ('Optionals', 'OPTIONAL pattern matching'), ('SelectQueries', 'SELECT query form'), ('SolutionSequence', 'Sorting (ORDER BY) and slicing (LIMIT, OFFSET)'), ('Unions', 'UNION pattern matching');
CREATE TABLE facet (pk int unsigned not null  auto_increment primary key, name VARCHAR(127), example VARCHAR(255), xpath VARCHAR(127), feature int unsigned not null, UNIQUE u_name(name));
INSERT INTO facet (name, feature) VALUES ('BaseDecl', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixDecl-default', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixDecl-nonDefault', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixDecl-n', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('SelectQuery-Distinct-Var', (SELECT pk FROM feature WHERE name='SelectQueries')), ('SelectQuery-Distinct-star', (SELECT pk FROM feature WHERE name='SelectQueries')), ('SelectQuery-noDistinct-Var', (SELECT pk FROM feature WHERE name='SelectQueries')), ('SelectQuery-noDistinct-star', (SELECT pk FROM feature WHERE name='SelectQueries')), ('SelectQuery-Var-n', (SELECT pk FROM feature WHERE name='SelectQueries')), ('DefaultGraphClause', (SELECT pk FROM feature WHERE name='Datasets')), ('DefaultGraphClause-n', (SELECT pk FROM feature WHERE name='Datasets')), ('NamedGraphClause', (SELECT pk FROM feature WHERE name='Datasets')), ('NamedGraphClause-n', (SELECT pk FROM feature WHERE name='Datasets')), ('GroupOrUnionGraphPattern-union', (SELECT pk FROM feature WHERE name='Unions')), ('OptionalGraphPattern', (SELECT pk FROM feature WHERE name='Optionals')), ('GraphGraphPattern', (SELECT pk FROM feature WHERE name='Datasets')), ('WhereClause-where', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('WhereClause-noWhere', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('GroupGraphPattern-empty', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('BasicGraphPattern-spo', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('BasicGraphPattern-spoDOT', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('BasicGraphPattern-spoo', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('BasicGraphPattern-spopo', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('BasicGraphPattern-spospo', (SELECT pk FROM feature WHERE name='BasicGraphPatterns')), ('Var-rVAR1', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('Var-rVAR2', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('IRIref-rQ_IRI_REF', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixedName-prefix', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixedName-localname', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('PrefixedName-prefix-localname', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('String-singleQuote', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('String-doubleQuote', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('String-triple-singleQuote', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('String-triple-doubleQuote', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('RDFLiteral-plain', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('RDFLiteral-rLANGTAG', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('RDFLiteral-datatype', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('NumericLiteral-rINTEGER', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('NumericLiteral-rDECIMAL', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('NumericLiteral-rDOUBLE', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('GraphTerm-plus', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('GraphTerm-minus', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('GraphTerm-BooleanLiteral-true', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('GraphTerm-BooleanLiteral-false', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('BlankNode-rBLANK_NODE_LABEL', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('BlankNode-rANON', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('Collection-0', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('Collection-1', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('Collection-n', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('BlankNodePropertyList', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('Verb-a', (SELECT pk FROM feature WHERE name='CoreSPARQL')), ('BuiltInCall-str', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-lang', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-langMatches', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-datatype', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-bound', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-sameTerm', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-isIRI', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-isBlank', (SELECT pk FROM feature WHERE name='Filters')), ('BuiltInCall-isLiteral', (SELECT pk FROM feature WHERE name='Filters')), ('RegexExpression', (SELECT pk FROM feature WHERE name='Filters')), ('RegexExpression-flags', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-iri', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-str', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-flt', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-dbl', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-dec', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-int', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-dT', (SELECT pk FROM feature WHERE name='Filters')), ('IRIrefOrFunction-cast-bool', (SELECT pk FROM feature WHERE name='Filters')), ('ConditionalOrExpression-n', (SELECT pk FROM feature WHERE name='Filters')), ('ConditionalAndExpression-n', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-eq', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-ne', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-lt', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-gt', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-le', (SELECT pk FROM feature WHERE name='Filters')), ('RelationalExpression-ge', (SELECT pk FROM feature WHERE name='Filters')), ('AdditiveExpression-n', (SELECT pk FROM feature WHERE name='Filters')), ('MultiplicativeExpression-n', (SELECT pk FROM feature WHERE name='Filters')), ('UnaryExpression-NOT', (SELECT pk FROM feature WHERE name='Filters')), ('UnaryExpression-PLUS', (SELECT pk FROM feature WHERE name='Filters')), ('UnaryExpression-MINUS', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rBrackettedExpression', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rBuiltInCall', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-IRIref', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-function', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rRDFLiteral', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rNumericLiteral', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rBooleanLiteral', (SELECT pk FROM feature WHERE name='Filters')), ('PrimaryExpression-rVar', (SELECT pk FROM feature WHERE name='Filters')), ('OrderClause-1', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderClause-n', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-noSC', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-ASC', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-DESC', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-rBrackettedExpression', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-rBuiltInCall', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-rFunctionCall', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('OrderCondition-rVar', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('LimitOffsetClauses-limit', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('LimitOffsetClauses-limit-offset', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('LimitOffsetClauses-offset', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('LimitOffsetClauses-offset-limit', (SELECT pk FROM feature WHERE name='SolutionSequence')), ('AskQuery', (SELECT pk FROM feature WHERE name='AskQueries')), ('AskQuery-yes', (SELECT pk FROM feature WHERE name='AskQueries')), ('AskQuery-no', (SELECT pk FROM feature WHERE name='AskQueries')), ('ConstructTriples', (SELECT pk FROM feature WHERE name='ConstructQueries')), ('ConstructTriples-bound', (SELECT pk FROM feature WHERE name='ConstructQueries')), ('ConstructTriples-unbound', (SELECT pk FROM feature WHERE name='ConstructQueries'));
CREATE TABLE query (pk int unsigned not null  auto_increment primary key, filepath VARCHAR(127), UNIQUE u_filepath(filepath));
CREATE TABLE queryFacet (pk int unsigned not null  auto_increment primary key, query int unsigned not null, facet int unsigned not null, canonical BOOLEAN, UNIQUE u_query_facet(query, facet));
CREATE TABLE implementation (pk INT UNSIGNED NOT NULL  AUTO_INCREMENT PRIMARY KEY, projectName VARCHAR(127), releaseName VARCHAR(127), releaseDate DATETIME, reporterName VARCHAR(127), reporterPage VARCHAR(127), localFile VARCHAR(127), UNIQUE  u_release(projectName, releaseDate), UNIQUE u_file(localFile));
CREATE TABLE test (pk INT UNSIGNED NOT NULL  AUTO_INCREMENT PRIMARY KEY, name VARCHAR(127), query INT UNSIGNED NOT NULL, approval BOOLEAN, requires BOOLEAN, UNIQUE  u_name(name));
INSERT INTO query (filepath) VALUES ('data-r2/triple-match/dawg-tp-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-03.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-noDistinct-star'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-03.rq'),
                        (SELECT pk FROM facet WHERE name='WhereClause-where'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-03.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoDOT'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-03.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/distinct/no-distinct-1.rq');

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/no-distinct-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/distinct/no-distinct-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-01.rq');

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-01.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spo'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-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/graph/graph-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/graph/graph-02.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-05.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-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/graph/graph-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/graph/graph-05.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/triple-match/dawg-tp-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-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/triple-match/dawg-tp-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/triple-match/dawg-tp-01.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/triple-match/dawg-tp-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/triple-match/dawg-tp-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/triple-match/dawg-tp-01.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/triple-match/dawg-tp-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-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/triple-match/dawg-tp-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/triple-match/dawg-tp-02.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/triple-match/dawg-tp-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/triple-match/dawg-tp-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/triple-match/dawg-tp-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/triple-match/dawg-tp-05.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-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/triple-match/dawg-tp-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/triple-match/dawg-tp-05.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/triple-match/dawg-tp-05.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/triple-match/dawg-tp-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/triple-match/dawg-tp-05.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/base-prefix-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-4.rq'),
                        (SELECT pk FROM facet WHERE name='BaseDecl'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-4.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/base-prefix-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-5.rq'),
                        (SELECT pk FROM facet WHERE name='BaseDecl'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-5.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/basic/base-prefix-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/basic/base-prefix-5.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/basic/base-prefix-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/basic/base-prefix-5.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-03.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/graph/graph-03.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/graph/graph-03.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-03.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/graph/graph-03.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/graph/graph-03.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-04.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-04.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/graph/graph-04.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/graph/graph-04.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-04.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/graph/graph-04.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/graph/graph-04.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-06.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-06.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-06.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-08.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-08.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/graph/graph-08.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/graph/graph-08.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-08.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/graph/graph-08.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/graph/graph-08.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-09.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-09.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/graph/graph-09.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/graph/graph-09.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-09.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/graph/graph-09.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/graph/graph-09.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-10.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-10.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/graph/graph-10.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/graph/graph-10.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-10.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/graph/graph-10.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/graph/graph-10.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/base-prefix-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-1.rq'),
                        (SELECT pk FROM facet WHERE name='BaseDecl'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/base-prefix-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-2.rq'),
                        (SELECT pk FROM facet WHERE name='BaseDecl'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/base-prefix-3.rq');

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixDecl-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-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/basic/base-prefix-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/list-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-1.rq'),
                        (SELECT pk FROM facet WHERE name='Collection-0'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/prefix-name-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/prefix-name-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/basic/prefix-name-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/basic/prefix-name-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/basic/prefix-name-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/basic/prefix-name-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/basic/prefix-name-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/prefix-name-1.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/i18n/kanji-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/i18n/kanji-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/i18n/kanji-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/i18n/kanji-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/i18n/kanji-02.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/i18n/kanji-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/i18n/kanji-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/i18n/kanji-02.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/i18n/normalization-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/i18n/normalization-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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-01.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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-01.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-01.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-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/dataset/dataset-01.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-02.rq'),
                        (SELECT pk FROM facet WHERE name='NamedGraphClause'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-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/dataset/dataset-02.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-07.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-07.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/graph/graph-07.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/graph/graph-07.rq'),
                        (SELECT pk FROM facet WHERE name='GroupOrUnionGraphPattern-union'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-07.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/graph/graph-07.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/graph/graph-07.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/graph/graph-11.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-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/graph/graph-11.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/graph/graph-11.rq'),
                        (SELECT pk FROM facet WHERE name='GraphGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/graph/graph-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/graph/graph-11.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/graph/graph-11.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/distinct/distinct-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-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/distinct/distinct-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/distinct/distinct-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/distinct/distinct-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-Var'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-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/distinct/distinct-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/distinct/distinct-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/triple-match/dawg-tp-04.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spospo'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/triple-match/dawg-tp-04.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/triple-match/dawg-tp-04.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/list-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-2.rq'),
                        (SELECT pk FROM facet WHERE name='Collection-1'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/list-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/list-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/basic/list-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/basic/list-3.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Var-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-3.rq'),
                        (SELECT pk FROM facet WHERE name='Collection-1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/list-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-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/basic/list-4.rq'),
                        (SELECT pk FROM facet WHERE name='Collection-n'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/quotes-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-1.rq'),
                        (SELECT pk FROM facet WHERE name='String-triple-singleQuote'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/quotes-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-2.rq'),
                        (SELECT pk FROM facet WHERE name='String-triple-doubleQuote'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-2.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/quotes-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-triple-singleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/i18n/kanji-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/i18n/kanji-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/i18n/kanji-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/i18n/kanji-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/i18n/kanji-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/i18n/kanji-01.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/i18n/kanji-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/i18n/kanji-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/i18n/kanji-01.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/construct/query-ident.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-ident.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/construct/query-ident.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/construct/query-ident.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/construct/query-ident.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/construct/query-ident.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/construct/query-ident.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-ident.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples-bound'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-ident.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples-unbound'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-10.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-10.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-10.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-10.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-10.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-10.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-10.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-10.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-2.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-2.rq'),
                        (SELECT pk FROM facet WHERE name='OrderClause-1'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-03.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/dataset/dataset-03.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/dataset/dataset-03.rq'),
                        (SELECT pk FROM facet WHERE name='NamedGraphClause'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-03.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-03.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-03.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-03.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-03.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-04.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-04.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/dataset/dataset-04.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/dataset/dataset-04.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-04.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-04.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-04.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-04.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-04.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-05.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-05.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-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/dataset/dataset-05.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-1.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery'),
                        TRUE);

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-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/ask/ask-4.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-4.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-4.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-7.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-7.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-7.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-7.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/ask/ask-7.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-7.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-7.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-7.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-7.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-false.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-false.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-false.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-false.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/ask/ask-false.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-false.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-false.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-false.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-false.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-true.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-true.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-true.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-true.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/ask/ask-true.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-true.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-true.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-true.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-true.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/ask/ask-var.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/ask/ask-var.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-var.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-var.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/ask/ask-var.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-var.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-var.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-var.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-var.rq'),
                        (SELECT pk FROM facet WHERE name='AskQuery-no'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/bnode-coreference/query.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.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/bnode-coreference/query.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/two-nested-opt.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/two-nested-opt.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/two-nested-opt.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/two-nested-opt.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/two-nested-opt.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/two-nested-opt.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/two-nested-opt.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/two-nested-opt.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/two-nested-opt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/lang-case-sensitivity-eq.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-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/lang-case-sensitivity-eq.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-eq'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-lang-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-lang-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-lang-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-lang-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-lang-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-lang-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/expr-builtin/q-lang-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-lang-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-lang-3.rq'),
                        (SELECT pk FROM facet WHERE name='String-doubleQuote'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/sameTerm.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm.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.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.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.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.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.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.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.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-sameTerm'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/spoo-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/basic/spoo-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/basic/spoo-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/basic/spoo-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/basic/spoo-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/basic/spoo-1.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spoo'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/spoo-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/basic/spoo-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/basic/spoo-1.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-1.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-BooleanLiteral-true'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-2.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-BooleanLiteral-false'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-3.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-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/basic/term-4.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDECIMAL'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-5.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/basic/term-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/basic/term-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/basic/term-5.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/basic/term-5.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/basic/term-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/basic/term-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/basic/term-5.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/basic/term-5.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDECIMAL'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-6.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-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/basic/term-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/basic/term-6.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/basic/term-6.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/basic/term-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/basic/term-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/basic/term-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/basic/term-6.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDECIMAL'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-7.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.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/basic/term-7.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDECIMAL'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-8.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-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/basic/term-8.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/basic/term-8.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/basic/term-8.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/basic/term-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/basic/term-8.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/basic/term-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/basic/term-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/basic/term-8.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-plus'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/term-9.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.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/basic/term-9.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-minus'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/var-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-1.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR2'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/var-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/i18n/normalization-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/i18n/normalization-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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-02.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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-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/i18n/normalization-02.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/i18n/normalization-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.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/i18n/normalization-03.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/construct/query-subgraph.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-subgraph.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/construct/query-subgraph.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/construct/query-subgraph.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/construct/query-subgraph.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/construct/query-subgraph.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/construct/query-subgraph.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/construct/query-subgraph.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-subgraph.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples-unbound'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-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/q-opt-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/q-opt-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/q-opt-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/q-opt-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/optional/q-opt-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/optional/q-opt-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/q-opt-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/q-opt-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-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-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-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-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-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/optional/q-opt-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-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/q-opt-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-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-graph-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-1.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rINTEGER'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-graph-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-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-equals/query-eq-graph-2.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDOUBLE'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-1.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-1.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-noSC'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-1.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-9.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-9.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-9.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-9.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-9.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-9.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-9.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-9.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-9.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-9.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-06.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-06.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-06.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-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/dataset/dataset-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/dataset/dataset-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/dataset/dataset-06.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-08.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-08.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/dataset/dataset-08.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/dataset/dataset-08.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-08.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-08.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-08.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-08.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-08.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-09.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-09.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/dataset/dataset-09.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/dataset/dataset-09.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-09.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-09.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-09.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-09.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-09.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-09b.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-09b.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/dataset/dataset-09b.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/dataset/dataset-09b.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-09b.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-09b.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-09b.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-09b.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-09b.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-10.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-10.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/dataset/dataset-10.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/dataset/dataset-10.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-10.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-10.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-10.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-10.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-10.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-10b.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-10b.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/dataset/dataset-10b.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/dataset/dataset-10b.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-10b.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-10b.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-10b.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-10b.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-10b.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/distinct/distinct-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-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/distinct/distinct-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/distinct/distinct-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/distinct/distinct-2.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-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/distinct/distinct-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/distinct/distinct-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/distinct/distinct-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/distinct/distinct-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/distinct/distinct-star-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-star-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/distinct/distinct-star-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/distinct/distinct-star-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/distinct/distinct-star-1.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-star'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/distinct-star-1.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/distinct/distinct-star-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/distinct/distinct-star-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/distinct/distinct-star-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/distinct/distinct-star-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/distinct/no-distinct-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-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/distinct/no-distinct-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/two-nested-opt-alt.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.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/two-nested-opt-alt.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/q-isliteral-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-isliteral-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-isliteral-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-isliteral-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-isliteral-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-isliteral-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-isliteral-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-isliteral-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-isliteral-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-isliteral-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-isLiteral'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-uri-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-uri-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-uri-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-uri-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-uri-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-uri-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-uri-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-uri-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-uri-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-uri-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-ge-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-ge-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-ops/query-ge-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-ops/query-ge-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-ops/query-ge-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-ops/query-ge-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-ops/query-ge-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-ops/query-ge-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/expr-ops/query-ge-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ge'),
                        TRUE);

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-le-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-ops/query-le-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-ops/query-le-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-ops/query-le-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-ops/query-le-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-ops/query-le-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-ops/query-le-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/expr-ops/query-le-1.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-le'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-le-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/expr-ops/query-le-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/construct/query-construct-optional.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-construct-optional.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/construct/query-construct-optional.rq'),
                        (SELECT pk FROM facet WHERE name='OptionalGraphPattern'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-construct-optional.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/construct/query-construct-optional.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/construct/query-construct-optional.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/construct/query-construct-optional.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/construct/query-construct-optional.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/construct/query-construct-optional.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples'),
                        FALSE);

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-1.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNodePropertyList'),
                        FALSE);

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

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-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-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-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-3.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-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/optional/q-opt-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-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/q-opt-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/optional/q-opt-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-3.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-prefix-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq2-graph-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-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-equals/query-eq2-graph-1.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-equals/query-eq2-graph-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-equals/query-eq2-graph-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-6.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-6.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-6.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-6.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-6.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-ASC'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-07.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/dataset/dataset-07.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/dataset/dataset-07.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-07.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-07.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-07.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-07.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-07.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-07.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-2.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-NOT'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-nested-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-nested-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/algebra/filter-nested-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-nested-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-nested-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-nested-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-nested-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-nested-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-nested-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-nested-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/filter-placement-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-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-placement-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/algebra/filter-placement-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-placement-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-placement-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-placement-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-placement-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-placement-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-placement-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-placement-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/filter-placement-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-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/algebra/filter-placement-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-01.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-01.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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-01.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNode-rANON'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-01.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/solution-seq/slice-01.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/solution-seq/slice-01.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-01.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-02.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-02.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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-02.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/solution-seq/slice-02.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/solution-seq/slice-02.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/solution-seq/slice-02.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-02.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.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/solution-seq/slice-03.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-03.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-04.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-04.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/solution-seq/slice-04.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.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/solution-seq/slice-04.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-04.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-10.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.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/solution-seq/slice-10.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-10.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-11.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-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/solution-seq/slice-11.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/solution-seq/slice-11.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/solution-seq/slice-11.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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-11.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/solution-seq/slice-11.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/solution-seq/slice-11.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/solution-seq/slice-11.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-11.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-12.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-12.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/solution-seq/slice-12.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/solution-seq/slice-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/solution-seq/slice-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/solution-seq/slice-12.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/solution-seq/slice-12.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/solution-seq/slice-12.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/solution-seq/slice-12.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-12.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-13.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-13.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/solution-seq/slice-13.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.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/solution-seq/slice-13.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-13.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-22.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.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/solution-seq/slice-22.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-22.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit-offset'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-22.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset-limit'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/lang-case-sensitivity-ne.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.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/lang-case-sensitivity-ne.rq'),
                        (SELECT pk FROM facet WHERE name='RelationalExpression-ne'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-blank-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-blank-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-blank-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-blank-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-blank-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-blank-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-blank-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-blank-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-blank-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-blank-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-isBlank'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/q-iri-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-iri-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-iri-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-iri-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-iri-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-iri-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-iri-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-iri-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-iri-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-iri-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-isIRI'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-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/basic/var-2.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/basic/var-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/basic/var-2.rq'),
                        (SELECT pk FROM facet WHERE name='Var-rVAR2'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/var-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrefixedName-localname'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-unminus-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unminus-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-ops/query-unminus-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-ops/query-unminus-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-ops/query-unminus-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-ops/query-unminus-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-ops/query-unminus-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-ops/query-unminus-1.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-minus'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unminus-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-ops/query-unminus-1.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-MINUS'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unminus-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/expr-ops/query-unminus-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-unplus-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unplus-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-ops/query-unplus-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-ops/query-unplus-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-ops/query-unplus-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-ops/query-unplus-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-ops/query-unplus-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-ops/query-unplus-1.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-plus'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unplus-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-ops/query-unplus-1.rq'),
                        (SELECT pk FROM facet WHERE name='UnaryExpression-PLUS'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-unplus-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/expr-ops/query-unplus-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/construct/query-reif-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-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/construct/query-reif-2.rq'),
                        (SELECT pk FROM facet WHERE name='BasicGraphPattern-spopo'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-reif-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/construct/query-reif-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/construct/query-reif-2.rq'),
                        (SELECT pk FROM facet WHERE name='BlankNode-rBLANK_NODE_LABEL'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-reif-2.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/construct/query-reif-2.rq'),
                        (SELECT pk FROM facet WHERE name='ConstructTriples-unbound'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-07.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-07.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-07.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-07.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-07.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-07.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-07.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-07.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-07.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-07.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-07.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-07.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-08.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-08.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-08.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-08.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-08.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-08.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-08.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-08.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-08.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-08.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-08.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-08.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-09.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-09.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-09.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-09.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-09.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-09.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-09.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-09.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-09.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-09.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-09.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-09.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-10.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-10.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-10.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-10.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-10.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-10.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-10.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-10.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-10.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-10.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-10.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-10.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-graph-3.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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/expr-equals/query-eq-graph-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-graph-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-graph-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-graph-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-graph-3.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-graph-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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-graph-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-graph-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-builtin.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-builtin.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-builtin.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-builtin.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-builtin.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-builtin.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-builtin.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-builtin.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-str'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-builtin.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-builtin.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-builtin.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-builtin.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rBuiltInCall'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-numbers.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-numbers.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-numbers.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-numbers.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-numbers.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/sort/query-sort-numbers.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-numbers.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-numbers.rq'),
                        (SELECT pk FROM facet WHERE name='AdditiveExpression-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-numbers.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-numbers.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-numbers.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-numbers.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rBrackettedExpression'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-11.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-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/dataset/dataset-11.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-11.rq'),
                        (SELECT pk FROM facet WHERE name='NamedGraphClause-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-11.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-11.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-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/dataset/dataset-11.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-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/dataset/dataset-11.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-bev-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-bev-5.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-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-5.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-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/boolean-effective-value/query-bev-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/boolean-effective-value/query-bev-5.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-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/boolean-effective-value/query-boolean-literal.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.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-boolean-literal.rq'),
                        (SELECT pk FROM facet WHERE name='GraphTerm-BooleanLiteral-true'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/boolean-effective-value/query-boolean-literal.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBooleanLiteral'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/filter-nested-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-2.rq'),
                        (SELECT pk FROM facet WHERE name='GroupGraphPattern-empty'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-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/algebra/filter-nested-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/join-combo-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/join-combo-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/join-combo-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/algebra/join-combo-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/algebra/join-combo-1.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/algebra/join-combo-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/join-combo-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/join-combo-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/join-combo-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/join-combo-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/join-combo-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/join-combo-1.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/join-combo-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-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/algebra/join-combo-2.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/opt-filter-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-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/opt-filter-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/opt-filter-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-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/algebra/opt-filter-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/algebra/var-scope-join-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/algebra/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/var-scope-join-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/algebra/var-scope-join-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/algebra/var-scope-join-1.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-rLANGTAG'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-20.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.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/solution-seq/slice-20.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-20.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit-offset'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-20.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-21.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.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/solution-seq/slice-21.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-21.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit-offset'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-21.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-23.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.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/solution-seq/slice-23.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-23.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit-offset'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-23.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/solution-seq/slice-24.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-24.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/solution-seq/slice-24.rq'),
                        (SELECT pk FROM facet WHERE name='SelectQuery-Distinct-Var'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.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/solution-seq/slice-24.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-24.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-limit-offset'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/solution-seq/slice-24.rq'),
                        (SELECT pk FROM facet WHERE name='LimitOffsetClauses-offset-limit'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-builtin/sameTerm-eq.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-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-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-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-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-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-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-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-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-eq.rq'),
                        (SELECT pk FROM facet WHERE name='ConditionalAndExpression-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-builtin/sameTerm-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-eq.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.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/basic/bgp-no-match.rq'),
                        (SELECT pk FROM facet WHERE name='Verb-a'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/basic/quotes-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-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/basic/quotes-4.rq'),
                        (SELECT pk FROM facet WHERE name='String-triple-doubleQuote'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/basic/quotes-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/basic/quotes-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/basic/quotes-4.rq'),
                        (SELECT pk FROM facet WHERE name='RDFLiteral-datatype'),
                        TRUE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-minus-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-minus-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-ops/query-minus-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-ops/query-minus-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-ops/query-minus-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-ops/query-minus-1.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-ops/query-minus-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-ops/query-minus-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-ops/query-minus-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/expr-ops/query-minus-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-ops/query-minus-1.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/expr-ops/query-minus-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/expr-ops/query-minus-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-mul-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-mul-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-ops/query-mul-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-ops/query-mul-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-ops/query-mul-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-ops/query-mul-1.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-ops/query-mul-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-ops/query-mul-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-ops/query-mul-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/expr-ops/query-mul-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-ops/query-mul-1.rq'),
                        (SELECT pk FROM facet WHERE name='MultiplicativeExpression-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-mul-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/expr-ops/query-mul-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-ops/query-plus-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-ops/query-plus-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-ops/query-plus-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-ops/query-plus-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-ops/query-plus-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-ops/query-plus-1.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-ops/query-plus-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-ops/query-plus-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-ops/query-plus-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/expr-ops/query-plus-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-ops/query-plus-1.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/expr-ops/query-plus-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/expr-ops/query-plus-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/optional/q-opt-complex-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-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/q-opt-complex-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/q-opt-complex-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/q-opt-complex-1.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-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/q-opt-complex-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/optional/q-opt-complex-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/optional/q-opt-complex-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/q-opt-complex-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/q-opt-complex-1.rq'),
                        (SELECT pk FROM facet WHERE name='BuiltInCall-bound'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/optional/q-opt-complex-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rBuiltInCall'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-03.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-03.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-03.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-03.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-03.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-03.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-03.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-03.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-03.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-03.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/open-world/open-eq-03.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-03.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/open-world/open-eq-03.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/open-world/open-eq-04.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/open-world/open-eq-04.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-04.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-04.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-04.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-04.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-04.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-04.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-04.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-04.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/open-world/open-eq-04.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-04.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/open-world/open-eq-04.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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/expr-equals/query-eq-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-equals/query-eq-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/expr-equals/query-eq-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-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-equals/query-eq-2.rq'),
                        (SELECT pk FROM facet WHERE name='NumericLiteral-rDOUBLE'),
                        FALSE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-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-equals/query-eq-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/expr-equals/query-eq-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-5.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-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/expr-equals/query-eq-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/expr-equals/query-eq-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/expr-equals/query-eq-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/expr-equals/query-eq-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/expr-equals/query-eq-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/expr-equals/query-eq-5.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-5.rq'),
                        (SELECT pk FROM facet WHERE name='IRIrefOrFunction-iri'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-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/expr-equals/query-eq-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-IRIref'),
                        TRUE);

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq-graph-5.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-graph-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/expr-equals/query-eq-graph-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/expr-equals/query-eq-graph-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/expr-equals/query-eq-graph-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/expr-equals/query-eq-graph-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/expr-equals/query-eq-graph-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/expr-equals/query-eq-graph-5.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-graph-5.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-equals/query-eq-graph-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/expr-equals/query-eq-graph-5.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-equals/query-eq-graph-5.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq2-1.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-1.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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-1.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/expr-equals/query-eq2-2.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/expr-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-2.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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-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-equals/query-eq2-2.rq'),
                        (SELECT pk FROM facet WHERE name='PrimaryExpression-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-4.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-4.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-4.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-4.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-4.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-DESC'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/sort/query-sort-5.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-5.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/sort/query-sort-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/sort/query-sort-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/sort/query-sort-5.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-5.rq'),
                        (SELECT pk FROM facet WHERE name='OrderClause-n'),
                        TRUE);

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/sort/query-sort-5.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-5.rq'),
                        (SELECT pk FROM facet WHERE name='OrderCondition-rVar'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-12.rq');

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-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/dataset/dataset-12.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/dataset/dataset-12.rq'),
                        (SELECT pk FROM facet WHERE name='DefaultGraphClause'),
                        FALSE);

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

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

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

INSERT INTO queryFacet (query, facet, canonical)
                VALUES ((SELECT pk FROM query WHERE filepath='data-r2/dataset/dataset-12.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-12.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-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/dataset/dataset-12.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-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/dataset/dataset-12.rq'),
                        (SELECT pk FROM facet WHERE name='IRIref-rQ_IRI_REF'),
                        FALSE);
INSERT INTO query (filepath) VALUES ('data-r2/dataset/dataset-12b.rq');

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='PrefixDecl-default'),
                        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='SelectQuery-noDistinct-star'),
                        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='DefaultGraphClause'),
                        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='DefaultGraphClause-n'),
                        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='NamedGraphClause'),
                        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='NamedGraphClause-n'),
                        FALSE);

