Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

; Returns the total profit for a given province prov. ; Returned orders (whose order numbers are listed in the returns list) ; should not

; Returns the total profit for a given province prov. ; Returned orders (whose order numbers are listed in the returns list) ; should not be included in this calculation!

(define (totalProfitProv prov sales returns)

)

data:

; Format of indiviudal sales ;(orderNum (orderDate shipDate) (grossSale discount profit unitPrice) (deliveryMethod province) product) (define SALES '( (3 ("10/13/2010" "10/20/2010") (261.54 0.04 -213.25 38.94) ("Regular Air" "Nunavut") "Eldon Base for stackable storage shelf, platinum") (293 ("10/1/2012" "10/2/2012") (10123.02 0.07 457.81 208.16) ("Delivery Truck" "Northwest Territories") "1.7 Cubic Foot Compact Cube Office Refrigerators") (995 ("5/30/2011" "5/31/2011") (1815.49 0.03 782.91 39.89) ("Regular Air" "Nunavut") "Ultra Commercial Grade Dual Valve Door Closer") (998 ("11/25/2009" "11/26/2009") (248.26 0.07 93.80 15.74) ("Regular Air" "Nunavut") "#10-4 1/8 x 9 1/2 Premium Diagonal Seam Envelopes") (1154 ("2/14/2012" "2/16/2012") (4462.23 0.04 440.72 100.98) ("Delivery Truck" "Nunavut") "Hon 4-Shelf Metal Bookcases") (1154 ("2/14/2012" "2/16/2012") (663.784 0.25 -481.04 71.37) ("Regular Air" "Nunavut") "Lesro Sheffield Collection Coffee Table, End Table, Center Table, Corner Table")

output looklike

6. TOTALPROFITPROV -------------------------------------- 529.3399999999999 96.65999999999998

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

What have been misses?

Answered: 1 week ago