Hi, here is my list of columns, i am trying to wr...
# sql
s
Hi, here is my list of columns, i am trying to write a query where in the output will be sum of all the "valuesin" for a particular Branch code say "RS032" in a given date range - e.g from 1st march - 3rd march can anyone guide me here with regards to sql query?
b
select sum(valuein) as my_sum from table where BranchCode = 'RS032' and datetime between '2022-04-01' and '2022-04-15';
s
Thanks, this is super i was able to come up with a query, which displays all the rows with a sum
Copy code
select branchcode, sum(valuein) as my_sum from daily where datetime between '2022-03-01' and '2022-03-07' group by branchcode ORDER BY "branchcode" ASC
thank you @burggraf
b
👍