Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help using SQL Developer or SQL * Plus CUSTOMER table [ [ CUSTOMER _ ID , FIRST _ NAME,SURNAME,ADDRESS,CONTACT _ NUMBER,EMAIL ] ,
please help using SQL Developer or SQL Plus
CUSTOMER
tableCUSTOMERIDFIRSTNAME,SURNAME,ADDRESS,CONTACTNUMBER,EMAILJack,Smith, Water Rdjsmith@isat.comPat,Hendricks, Water Rdph@mcom.cozaAndre,Clark,table SummerLaneaclark@mcom.coaKevin,Jones,table Mountainwaykj@isat.coaLucy,Williams, Main rdlw@mcal.coza
EMPLOYEE
tableEMPLOYEEIDFIRSTNAME,SURNAME,CONTACTNUMBER,ADDRESS,EMAILempJeff,Davis, main road,jand@isat.comempKevin,Marks,table waterroadkm@isat.comempAdanya,Andrews, circle lane,aa@isat.comempAdebayo,Dryer, sea road,aryer@isat.comempXolani,Samson, main road,xosam@isat.com
DONATOR
tableDONATORIDFIRSTNAME,SURNAME,CONTACTNUMBER,EMAILJeff,Watson,jwatson@ymail.comStephen,Jones,joness@ymail.comJames,Joe,j@@isat.comKelly,Ross,kross@gsat.comAbraham,Clark,aclark@ymail.com
DONATION
tableDONATIONIDDONATORIDDONATION,PRICE,DONATIONDATEKIC Fridge,R May Samsung inch LCD,R May Sharp Microwave,R May Seat Dining room table,R May Lazyboy Sofa,R May JVC Surround Sound System,R May
DELIVERY
tableDELIVERYIDDELIVERYNOTES,DISPATCHDATE,DELIVERYDATEDouble packaging requested, May May Delivery to work address, May May Signature required, May May No notes, May May Birthday present wrapping required, May May Delivery to work address, May May
RETURNS
tableRETURNIDRETURNDATE,REASON,CUSTOMERIDDONATIONIDEMPLOYEEIDret May Customer not satisfied with product,empret May Product had broken section, emp
INVOICE
tableINVOICENUM,CUSTOMERIDINVOICEDATE,EMPLOYEEIDDONATIONIDDELIVERYID May emp May emp May emp May emp May emp May emp
Question
Please create the tables and populate them using SQL Developer or SQLPlus
Question
Marks:
CHARITY AFRICA requires a report containing the combined customer name, employee id delivery notes, donation purchased and the invoice number. Create a SQL query to generate the required report. In your query, only display the results that have any invoice date before May
Question
Marks:
Management of CHARITY AFRICA would like to add a new table called Funding that at present will not have any referential integrity. The organisation would like an automatically generated unique id every time a record is inserted into the new table. The attributes the table must contain for now are fundingid funder, and funding amount.
Create the new table and implement a solution to aut omatically generate the unique ids with every new insert. In your solution provide an example of the insert statement.
Question
Marks:
Create a PLSQL query to display the combined customer name, donation purchased, donation price and the reason that the donation was returned.
Sample Output:
CUSTOMER: Jack, Smith
DONATION PURCHASED: JVC Surround Sound System
PRICE:
RETURN REASON:Customer not satisfied with product
CUSTOMER: Andre, Clark
DONATION PURCHASED: Seat Dining rm table
PRICE:
RETURN REASON: Product had broken section
Question
Marks:
Create a PLSQL query to display the customer's name, employee name, donation, dispatch date and the delivery date. In your query, also display the number of days between the dispatch date and the delivery date in days for customer
Question
Marks:
Create a report to display the combined customer name and total amount spent by each customer on the purchases. In your solution determine the customer rating as follows: If the total spent amount is greater than or equal to R the customer receives a star rating, otherwise no star rating applies.
Question
Marks:
Provide relevant code examples, with code comments based on this case study of how to implement the following:
Note: Provide your own code examples with comments and the achieved output for each question. The reuse of codes from the previous questions QQ will be awarded a
QTYPE attribute;
QROWTYPE attribute
Q System defined exception.
Q User defined exception
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started