Skip to content

Instantly share code, notes, and snippets.

@jbothma
Created August 13, 2016 16:00
Show Gist options
  • Save jbothma/14f7b8a9b2f6a305ad0e1fcbdf61b385 to your computer and use it in GitHub Desktop.
Save jbothma/14f7b8a9b2f6a305ad0e1fcbdf61b385 to your computer and use it in GitHub Desktop.
CPT <30 days 2015-2016 month 9
municipal_finance=> select l.code, l.label, customer_group_code, l30_amount from aged_debtor_facts f, aged_debtor_items l where f.item_code = l.code and demarcation_code = 'CPT' and financial_year = 2016 and financial_period = 09 and amount_type_code = 'ACT' order by position_in_return_form limit 30;
code | label | customer_group_code | l30_amount
------+----------------------------------------------------------------------+---------------------+------------
1100 | Debtors Age Analysis By Income Source | | 0
1100 | Debtors Age Analysis By Income Source | 2290 | 0
1100 | Debtors Age Analysis By Income Source | 2301 | 0
1100 | Debtors Age Analysis By Income Source | 2401 | 0
1200 | Trade and Other Receivables from Exchange Transactions - Water | | 424397380
1200 | Trade and Other Receivables from Exchange Transactions - Water | 2290 | 13271073
1200 | Trade and Other Receivables from Exchange Transactions - Water | 2301 | 193975948
1200 | Trade and Other Receivables from Exchange Transactions - Water | 2401 | 350268263
1300 | Trade and Other Receivables from Exchange Transactions - Electricity | | 686959746
1300 | Trade and Other Receivables from Exchange Transactions - Electricity | 2290 | 39416477
1300 | Trade and Other Receivables from Exchange Transactions - Electricity | 2301 | 534807715
1300 | Trade and Other Receivables from Exchange Transactions - Electricity | 2401 | 103120566
1400 | Receivables from Non-exchange Transactions - Property Rates | | 477690287
1400 | Receivables from Non-exchange Transactions - Property Rates | 2290 | 12421799
1400 | Receivables from Non-exchange Transactions - Property Rates | 2301 | 216369608
1400 | Receivables from Non-exchange Transactions - Property Rates | 2401 | 251036725
1500 | Receivables from Exchange Transactions - Waste Water Management | | 191518077
1500 | Receivables from Exchange Transactions - Waste Water Management | 2290 | 8728091
1500 | Receivables from Exchange Transactions - Waste Water Management | 2301 | 39671164
1500 | Receivables from Exchange Transactions - Waste Water Management | 2401 | 141328643
1600 | Receivables from Exchange Transactions - Waste Management | | 78563246
1600 | Receivables from Exchange Transactions - Waste Management | 2290 | 2831985
1600 | Receivables from Exchange Transactions - Waste Management | 2301 | 11569796
1600 | Receivables from Exchange Transactions - Waste Management | 2401 | 66676479
1700 | Receivables from Exchange Transactions - Property Rental Debtors | | 52626261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment