Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

see here: https://mode.com/sql-tutorial/sql-window-functions/

SELECT start_terminal,
       duration_seconds,
       SUM(duration_seconds) OVER
         (PARTITION BY start_terminal ORDER BY start_time)
         AS running_total
  FROM tutorial.dc_bikeshare_q1_2012
 WHERE start_time < '2012-01-08'
Source by mode.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+8 =