Original query:

with hist as (
        select histogram(snr, -10, 35, 50) as hist from (
                select snrs[1] as snr from det1 where sitename = 'riogrande' and time between '2019/08/01 ' and '2019/08/02'
        ) as data
),
mids as (
        select histogram_mids(-10, 35, 50) as mids
)
select mid, count from hist, mids, unnest(hist.hist) with ordinality as foo(count, o1), unnest(mids.mids) with ordinality as bar(mid, o2) where o1 = o2;