Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQL Language Show owners with unpaid bill ( an order is classified as unpaid if

ID: 3721189 • Letter: S

Question

SQL Language

Show owners with unpaid bill ( an order is classified as unpaid if the paid indicator is = "No"), listing the owner name, owner phone, business number, business name, the amount due, and a new amount due ( add 7% to the amount due and amount due display in descending order)

Margon finaltest2: Database- CAUserslowner Desktop finalifinaltest2.accdb (Access 2007-2016 file format) Access ant to dio Database Tools Design External Data Property Sheet ??" Insert Rows utu Insert Columns X Delete Rows Delete Columns CD Union Pass-Through Show ?Data Definition | Table ?Builder Totals Parameters ppend Update Crosstab Delete Return:All Show/Hide Query Setup Query Type

Explanation / Answer

/*SQL Language

Show owners with unpaid bill ( an order is classified as unpaid if the paid indicator is = "No"),
listing the owner name, owner phone, business number,
business name, the amount due, and a new amount due
( add 7% to the amount due and amount due display in descending order)*/
SELECT o.OwnerName,o.OwnerPhone,b.BusinessNum,b.BusinessName,oi.InvoiceAmt AS 'Amount Due',((oi.InvoiceAmt*0.07)+oi.InvoiceAmt) AS 'New Amount Due'
FROM Owner o INNER JOIN Busines_Info b ON o.OwnerID=b.OwnID
INNER JOIN Order_Info oi ON b.BusinessNum=oi.BusinessNum
WHERE oi.Paid='No'
ORDER BY 6;