Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Created February 24, 2021 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nfarah86/097122e19a5c1b52b59bf3f6b4ec4386 to your computer and use it in GitHub Desktop.
Save nfarah86/097122e19a5c1b52b59bf3f6b4ec4386 to your computer and use it in GitHub Desktop.
Get the sum of all orders
select
SUM(
CAST(
REGEXP_REPLACE(o.OrderTotal, '[$,\,]', '') AS float
)
) as totalRevenue
from
commons.OrderItem o
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment