can someone check my code please? It drives me crazy

select count(a.total), a.range as Range from (select sum(upload_count) as total, case when sum(upload_count) between 0 AND 6672 then ‘0-6672’, when sum(upload_count) between 6672 AND 22103 then ‘6672-22103’, when sum(upload_count) between 22103 AND 38076 then ‘22103-38076’, when sum(upload_count) between 38076 AND 70000 then ‘38076-70000’, when sum(upload_count) > 70000 then ‘>70000’ else null end as ‘range’ from…

Details

Destructure single object into an array of multiple objects

I have the following array with on single object in it. [{“IP_Address”:”33.4.160.5″,”originEmailAddress”:”[email protected]”}] I want to destructure it and put it into this format, a two-element array of objects: [{“IP_Address: “33.4.160.5”},{“originEmailAddress”: “[email protected]”}] What would be the most efficient way of doing this? I know how to get it back into the same format, like this: let…

Details