Hi, i am trying to merge responses from 2 queries ...
# sql
s
Hi, i am trying to merge responses from 2 queries and display it columwise. query 1
SELECT branchcode, valuein from daily WHERE CAST(datetime AS DATE) = {{date1.value}} ORDER BY "branchcode" ASC
query2
select branchcode, sum(valuein) as my_sum from daily where datetime between {{moment(date1.value).format("YYYY-MM-DD")}} and {{moment(date1.value).add(6, 'DAYS').format("YYYY-MM-DD")}} group by branchcode ORDER BY "branchcode" ASC
Desired output column-wise branchcode, valuein, my_sum i tried using WITH, and subquery - but ran out of luck. thanks in advance.
@burggraf Possible to guide me in some direction here?
b
Sorry I'm not available now. You might want to post a discussion here: https://github.com/supabase/supabase/discussions