Subquery Inner Join

I have a question. How can I write a query like this in rom:

SELECT COUNT(*)
FROM "table_a"
INNER JOIN (
  SELECT "column_x"
  FROM "table_b"
  WHERE "table_b"."column_y" = '<whatever>' ORDER BY "table_b"."column_y" asc limit 1) 
) AS "some_alias" ON "table_b"."column_x" = "table_a"."id"
WHERE "table_a"."column_a" = 1;

I am more interested in the inner join’s nested subquery though. I can only pass a relation to the .left_join and I can’t seem to be able to figure this out with blocks or any other way with the builtin methods. I tried views as well but they do not apply. Am I missing something? Can I somehow pass a dataset or a literal?