Question: Table: customer _ test customer _ id customer _ first _ name customer _ last _ name 1 Johnny Walker 2 Amber Rose Table: account
Table: customertest
customerid customerfirstname customerlastname
Johnny Walker
Amber Rose
Table: accounttest
accountid billamount customerid
Corporate
Table: paymenttest
paymentid paymentamount paymentdate accountid
Table: billtest
billid billamount accountid billdate
based on table above,Write a query to display first name, last name, total bill amount, and total payment amount from tables customertestpaymenttest and billtest You are expected to use sql sum and group by functions.
Expected Result
totalpaymentamount totalbillamount customerlastname customerfirstname
Smith PeterThe table here is just an example of how your answer is expected. You use this as a reference only!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
