this query you posted is seriously broken – the syntax errors should be obvious
but i’m glad you resolved your issue