Overview
You request Aurea to provide active gas accounts for the New York region. You want the report to include the criteria Account #, Account Name, Utility, Rate/Product name, Rate/Product expiration date.
Solution
Please raise a support ticket with us specifying the criteria, if different from those mentioned. We will share the requested information with you.
<supportagent>
Prerequisites:
-
Access to the Client database
Steps:
Run the following select query to get the requested information and share the query result with the client.
In case the criteria are different from the mentioned ones, add or remove columns to fetch the requested information. You can refer to Getting-Different-Information-Related-to-Customers for additional information.
select ct.CustNo [Account #],
concat(ct.FirstName,' ', ct.LastName) [Account Name],
l.ldcname [Utility], r.RateCode, r.ExpirationDate,
ps.status[Premise Status], p.PremNo [UAN],
p.premType [Commodity]
from Customer ct
join premise p on p.custid = ct.custid
join Address ad1 on ad1.AddrId = ct.MailAddrID
join premisestatus ps on ps.premisestatusid = p.statusid
join rate r on r.RateId = ct.RateId
join ldc l on l.ldcid = p.ldcid
where
ad1.state='NY' AND
p.statusid = 10
</supportagent>