How can I use UNION in Adonis?

I need to vertical join for displaying all of transactions regarding to a business those split in two tables in a table in the front-end with pagination.
I need to use UNION method, but I don’t how I can use it in the Adonis!

1 Like

Adonis is using Knex internally. So just check all the API available on their website:

let data = await'*').table(this.table)
    .where('id', user_id)
            .where('id', another_id)