I'm trying to run a PartiQL query in DynamoDB that will return all items in a table that match the userId of 1 item in that table. I tried running the below query, but I'm getting the following error. How can I get this to work?
ValidationException: IN operator must have a left hand argument of type Variable Reference and right hand argument of type Seq with at least one member
SELECT id FROM "mytable" WHERE userId IN (SELECT * FROM "mytable" WHERE "id" = 'a1')
These are the items in my table.

After running the query, I'm only expecting the ids: a1 and a2 to be returned.