Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. SELECT
  2. day
  3. ,SUM(Profit)
  4. FROM
  5. (
  6. Select
  7. t1.day
  8. ,t2.Profit
  9. FROM f_daily_sales t1
  10. JOIN f_daily_sales t2
  11. On t1.food_truck_id = t2.food_truck_id
  12. AND t1.day >=t2.day
  13. ) t3
  14. Group by day
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement