Skip to content

window function rolling sum

I have a window function that gives me a rolling sum as below: but when some timestamps in the start_time column are equal the rolling sum stays the same, which makes sense bc I am ordering by start time, but it does not properly add the duration_seconds in the rolling sum as below: how can i fix or account f…

Combining Values in a Column by Date

I have been tasked with writing this simple query and am not sure where to go from here. I am trying to create a report that shows 3 columns: Date_Column, Id_Column, & Amount_Col. The table for Id_Column has different IDs based on a location column (in the table, but not in my query below). For the report…