Revenue Report by Checkout PluginOverviewSELECT A.name, sum(B.billed_amt) as amt, count(B.id) as quan from %%AGILE_DB_PREFIX%%checkout A join %%AGILE_DB_PREFIX%%invoice B on(A.id=B.checkout_plugin_id and B.billing_status=1 and (B.refund_status='' OR B.refund_status is null))A.site_id=%%DEFAULT_SITE%% and B.site_id=%%DEFAULT_SITE%%GROUP BY name ORDER BY amt DESC30Checkout OptionnameInvoicesquantrueAmountamtdol,2truedol,2SELECT A.name, sum(B.billed_amt) as amt from %%AGILE_DB_PREFIX%%checkout A join %%AGILE_DB_PREFIX%%invoice B on(A.id=B.checkout_plugin_id and B.billing_status=1 and (B.refund_status='' OR B.refund_status is null))A.site_id=%%DEFAULT_SITE%% and B.site_id=%%DEFAULT_SITE%%GROUP BY name ORDER BY amt DESCSELECT B.name, sum(A.billed_amt) as amt, count(B.id) as quan from %%AGILE_DB_PREFIX%%invoice A join %%AGILE_DB_PREFIX%%checkout B on (A.checkout_plugin_id=B.id)A.site_id = %%DEFAULT_SITE%% and A.billing_status=1 and (A.refund_status IS NULL or A.refund_status!='')GROUP BY name ORDER BY amt DESC0Checkout Option: nametruetruetruefalsefalseInvoicesquantrueAmountamtdol,2SELECT from_unixtime(A.date_orig,"%Y-%U") as yearmonth, sum(A.billed_amt) as amt, B.name from %%AGILE_DB_PREFIX%%invoice A
join %%AGILE_DB_PREFIX%%checkout B on (A.checkout_plugin_id=B.id)A.site_id=%%DEFAULT_SITE%% and B.site_id=%%DEFAULT_SITE%% and (A.refund_status IS NULL or A.refund_status!='')GROUP BY yearmonth, name ORDER BY yearmonth ASC