Overview
You want to get the usage billed for a list of accounts for a particular time period (months) or bill period.
Solution
Please raise a support ticket mentioning the list of Utility Account Numbers and the specific date range (months) for which the usage information needs to be fetched. We will pull the usage and share it with you.
<supportagent>
Pre-requisite
Access to the Client database
Steps :
1. Run the select query below to fetch the consumption or usage for the given accounts.
Replace the parameter PremNo with the Utility Account Number or LDC Account Number of the given accounts.
Replace the parameter datefrom and dateto according to the date range specified by the client. It is suggested to use the 'datefrom' start range a month prior to the given month so that usage in the given month is included in the query result. For example, if the client requests usage for the months of October and November, it is recommended to set the 'datefrom' start date as '2020-09-01'.
In the query result, the column 'consdetqty' denotes the usage for the PremNo corresponding to the date range. Multiple rows may be returned for a PremNo, you can sum the values in the column 'consdetqty' to get the usage for that PremNo.
Select c.custno,p.PremNo, co.datefrom, co.dateto, cd.consdetqty
from Customer c
join Premise p on p.CustID = c.CustID
join Meter m on m.PremID = p.PremID
join Consumption co on co.MeterID = m.MeterID
join ConsumptionDetail cd on cd.consid = co.consid
where 1=1
and p.PremNo in ('0180001013715', '0180002998933') and
co.datefrom between '2020-09-01' and '2020-11-30' and
co.dateto between '2020-10-01' and '2020-11-30'
2. Share the query result with the client. If the client has mentioned explicitly to provide a breakup per month, share the result as-is. If not, provide the summed usage value per PremNo to indicate the usage for all the months.
</supportagent>