MATCH (n) MATCH (a:Actor{name:'Carrie-Anne Moss'})-[r:ACTED_IN {role :'Trinity', attr> 0.7}]-() RETURN a,r;
not sure what the initial MATCH (n) is providing. It basically says traverse the entire graph and alias each node to variable n. But then n is never used again. Not sure I see the need for this.
Regarding your I could not get the following query to work, i get syntax errors: although not stated, I presume you are getting errors similar to
neo4j> MATCH (n) MATCH (a:Actor{name:'Carrie-Anne Moss'})-[r:ACTED_IN {role :'Trinity', attr> 0.7}]-() RETURN a,r;
Invalid input '>': expected an identifier character, whitespace or ':' (line 1, column 86 (offset: 85))
"MATCH (n) MATCH (a:Actor{name:'Carrie-Anne Moss'})-[r:ACTED_IN {role :'Trinity', attr> 0.7}]-() RETURN a,r;"
is that correct? Is this the error you receive? If not what error do you receive?
If this is the error you get then this is because the expression at {role :'Trinity', attr> 0.7} needs to be a JSON statement. As JSON does not support a > the alternative would be
MATCH (n) MATCH (a:Actor{name:'Carrie-Anne Moss'})-[r:ACTED_IN]-() where r.role='Trinity' and r.attr>0.7 RETURN a,r;
though again in this case I'm not sure of the 'MATCH (n)` and what benefit it serves