I was writing an SQL query in OrientDB and it's returning "Encountered LET Was expecting one of: EOF ISOLATION ..." in my query and I'm not sure why.
This is my query:
BEGIN
let $counter = UPDATE counter INCREMENT value = 1 return after $current WHERE name = 'mycounter'
INSERT INTO items SET user_id = $counter.value[0], username="Hello Kitty xoxo", name="Jane", surname="Doe", membership="Premium", date_of_account_creation="2023-01-01"
commit
I was trying to make a query that's going to update my id. I already created a class counter and set values in it.