Question: Tables you will be using: Debtor Usage The debtor table resides in the A database The usage table resides in the B database 1: Put
| Tables you will be using: Debtor Usage The debtor table resides in the A database The usage table resides in the B database
1: Put the following in order: Having, Group by, Where, Select
2: Write a query that pulls back the debtor, premise, service type and usage rate
3:Write a query to pull back debtors that have an email
4: write a query to pull back the total number of unique debtors
5:write a query that tells how many unique debtors there are, per state
6:Write a query that pulls back debtors with an active account status that have usage over 50Kwh of usage
7: write a query that pulls back only residential debtors with an active account and an email address
8: Write the following queries: returns the debtor with the lowest usage amount/largest usage amount/total usage amount for all debtors
9. Write a query to create a table that holds the debtor number, premise number service state and service rate
|
Debtornum Premnum debtor name debtor_svc type Has_Myaccount debtor class debtor email debtor svc state Do_Not_contact account status payment code 12345 3000001 smith john @gmail.co 0 A CSH autop CSH recurpay 2346 3000002 smith_john 12346@yahoo.com CO MN MN 12347 3000003 Smith_Jane 2348 3000004 Smith_Jane 12349 3000005 Smith_James 123410 3000006 Smith James 123411 3000007 Cup Donna 123412 3000008 Extra_Mike 23413 3000009 Nalgene_Thomas 123414 3000010 Candy Peter 123415 3000011 Tupp Paul 123416 3000012 Cole Allegra 12417 3000013 Laine_Lily 123418 3000014 Laine Luke 123419 3000015 Daniel Luke 123420 3000016 Chris_Mary 123421 3000017 Copper Doug 234223000018 Wolcox Daniel 123423 3000019 Wolcox Daniel 234243000020 Woolman Eric 12349@comcast.net TX 1 A 1 A 1 A autopay autopay CSH CSH CSH autop CSH recurpay 123411@gmail.com NM 12@gmail.comWI tommyb@gmail.com M candvman tuppman acole@yahoo.com MN llaine@gmail.com MN llaine@gmail.comTX ail.con co mail.com CO 0 A 0 A 0 A 0 A 0 A 0 A 0 A 0 F ail.com mary c123@hotmail.cNM coppertop@msn.com WI woolyd@aol.com M dwool@gmail.com wolmane@aol.com Co autopay autopay CSH CSH autopay autopay CO 0 A O A 9 7 3277 9816792 968622 2 123 1 123 1 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts


