TLD Statistics SELECT A.domain_tld, count(A.id) as total, sum(B.total_amt) as total_amt from %%AGILE_DB_PREFIX%%service A join %%AGILE_DB_PREFIX%%invoice_item B on A.invoice_item_id=B.id A.site_id = %%DEFAULT_SITE%% and A.active=1 and A.type LIKE '%domain%' GROUP BY domain_tld ORDER BY total_amt DESC 0 TLD domain_tld true Total Registrations total true Total Sales total_amt true dol,2 heading SELECT DISTINCT from_unixtime(A.date_orig,"%Y") as yearmonth, A.domain_tld, count(A.id) as total, sum(B.total_amt) as total_amt from %%AGILE_DB_PREFIX%%service A join %%AGILE_DB_PREFIX%%invoice_item B on A.invoice_item_id=B.id A.site_id = %%DEFAULT_SITE%% and A.active=1 and A.type LIKE '%domain%' GROUP BY yearmonth ORDER BY yearmonth 0 Year: yearmonth true true true false false SELECT from_unixtime(A.date_orig,"%Y") as yearmonth, A.domain_tld, count(A.id) as total, sum(B.total_amt) as total_amt from %%AGILE_DB_PREFIX%%service A join %%AGILE_DB_PREFIX%%invoice_item B on A.invoice_item_id=B.id A.site_id = %%DEFAULT_SITE%% and A.active=1 and A.type LIKE '%domain%' GROUP BY domain_tld ORDER BY total_amt DESC 30 TLD domain_tld true Total Registrations total true Total Sales total_amt true dol,2 heading SELECT DISTINCT from_unixtime(A.date_orig,"%M, %Y") as yearmonth, A.domain_tld, count(A.id) as total, sum(B.total_amt) as total_amt from %%AGILE_DB_PREFIX%%service A join %%AGILE_DB_PREFIX%%invoice_item B on A.invoice_item_id=B.id A.site_id = %%DEFAULT_SITE%% and A.active=1 and A.type LIKE '%domain%' GROUP BY yearmonth ORDER BY yearmonth 0 Month, Year: yearmonth true true true false false SELECT from_unixtime(A.date_orig,"%M, %Y") as yearmonth, A.domain_tld, count(A.id) as total, sum(B.total_amt) as total_amt from %%AGILE_DB_PREFIX%%service A join %%AGILE_DB_PREFIX%%invoice_item B on A.invoice_item_id=B.id A.site_id = %%DEFAULT_SITE%% and A.active=1 and A.type LIKE '%domain%' GROUP BY domain_tld ORDER BY total_amt DESC 30 TLD domain_tld true Total Registrations total true Total Sales total_amt true dol,2