Eman-RazTotal Number of Unique Borrowers
    Updated 2023-02-13
    with arbitrum as (select 'Arbitrum' as "Chain", count(distinct BORROWER) as "Borrower Count"
    from arbitrum.sushi.ez_borrowing
    where action='Borrow'
    group by 1
    order by 1),
    avalanche as (select 'Avalanche' as "Chain" , count(distinct BORROWER) as "Borrower Count"
    from avalanche.sushi.ez_borrowing
    where action='Borrow'
    group by 1
    order by 1),
    ethereum as (select 'Ethereum' as "Chain", count(distinct BORROWER) as "Borrower Count"
    from ethereum.sushi.ez_borrowing
    where action='Borrow'
    group by 1
    order by 1),
    gnosis as (select 'Gnosis' as "Chain", count(distinct BORROWER) as "Borrower Count"
    from gnosis.sushi.ez_borrowing
    where action='Borrow'
    group by 1
    order by 1),
    polygon as (select 'Polygon' as "Chain", count(distinct BORROWER) as "Borrower Count"
    from polygon.sushi.ez_borrowing
    where action='Borrow'
    and tx_hash not in ('0x0c9a289e6a092e40f0c6e774c7f144a9ef741a5be86f776ea3578e32e3c191aa','0xfda2866df4232d1aa82ac2bda046bc5ee5a2485825c08b4ab3bbfb3e7b85ca14'
    , '0x960308538932442149b5599e18f234256015456967a9e3b2778fd4598338fb44','0xbd46f6231c3aaae3fd915429192ecb0cc7b5308af2a11f2095a2433a019df7f0')
    group by 1
    order by 1)

    select * from arbitrum union all
    select * from avalanche union all
    select * from ethereum union all
    select * from gnosis union all
    select * from polygon
    Run a query to Download Data