DEV Community

Discussion on: 4 Ways to Calculate a Running Total With SQL

helenanders26 profile image
Helen Anderson

Looking good!

If you'd like the code to be highlighted for SQL all you need to do is add the word sql immediately after your first set of back ticks.

   , driver_id
   , sum(profit)
      , t1.driver_id
      , t2.profit
    from f_daily_rides t1
        join f_daily_rides t2
        on driver_id =driver_id
            and t1.month = t2.month
            and t1.year = t2.year
            and >
) t3
group by day
Thread Thread
seattledataguy profile image
SeattleDataGuy Author

Oh! I didn't actually know that.

I went back and updated some other posts too that have python and json.

Thanks for all your help!

Thread Thread
helenanders26 profile image
Helen Anderson

No worries Ben, keep the awesome SQL content coming :)