--- CSC 365 Spring 2008
--- Lab 8 BAKERY dataset test 01


--- read BAKERY package

start BAKERY-package.sql

show errors

--- SQL queries involving new functions

--- note: I am using table names from "my" database: please adjust them to match your
---       table names

--- item_revenue()

--- query 1

 select distinct bakery.item_revenue('Croissant','Chocolate', '01-OCT-07','31-OCT-07') from
  goods;

--- query 2

 select distinct bakery.item_revenue('Croissant','Chocolate', '10-OCT-07','20-OCT-07')
   from goods;

--- query 3

 select food, flavor, bakery.item_revenue(food, flavor, '01-OCT-07','31-OCT-07')
 from goods;


--- query 4

   
 select food, flavor, bakery.item_revenue(food, flavor, '01-OCT-07','31-OCT-07')
 from goods
 where price > 5;


--- customer_revenue()



--- query 1

 select distinct bakery.customer_revenue('ZEME', '01-OCT-07','31-OCT-07') from customers;

--- query 2

 select distinct bakery.customer_revenue('ZEME', '10-OCT-07','20-OCT-07') from customers;

--- query 3

 select FirstName, Lastname, bakery.customer_revenue(LastName, '01-OCT-07','31-OCT-07')
 from customers;


--- query 4

   
 select CID, FirstName, LastName, 
        bakery.customer_revenue(LastName, '01-OCT-07','31-OCT-07')
 from customers
 where cid <  11;







