Hello! That syntax with UNNEST is PostgreSQL-specific.
You can use a recursive query (this query assumes presence of primary key id column): with recursive cte(i, s) as ( (select id, tags from company order by id fetch first row only) union all (select company.id, s || tags from cte, company where company.id > i order by company.id fetch first row only) ) select distinct v from unnest(select s from cte order by i desc fetch first row only) q(v); If you need a more efficient implementation you can create an own specialized user-defined function: https://h2database.com/html/commands.html#create_aggregate -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/8bd52741-11c1-4403-848d-36816f85533fn%40googlegroups.com.