Homework Solution: Please write a PLSQL code for the following SQL PLSQL Question…

    Please write a PLSQL code for the following SQL PLSQL Question Please Use the following code and provide both SQL and PLSQL Statements Code 1(Step 1) https://codeshare.io/2EMK1o Code 2 (Step 2) https://codeshare.io/5PpZ0d Questions Query 1: Produce a list of current salary, monthly salaries, new salaries (monthly with 20% increase) for all staff, showing staff number, first and last names, and salary details. Query 2: List all staff whose salary is greater or equal than the average salary of staff working in Branch B010, and show by how much. Query 3: Find name of owners that the rent of their property is larger than all properties handled by branch B010. Query 4: For total rent collected for properties located in different cities, list the cities and property with the highest rent collected Query 5: List properties handled by staff at Burmingham.

    Expert Answer

     
    hi, it is not given if the salary in staff table is daily on monthly, here given to calculate, so assuming its daily

    Fascinate transcribe a PLSQL adjudication coercion the controlthcoming

    SQL PLSQL Question

    Fascinate Use the controlthcoming adjudication and prepare twain SQL and PLSQL Statements

    Adjudication 1(Step 1) https://codeshare.io/2EMK1o
    Adjudication 2 (Step 2) https://codeshare.io/5PpZ0d

    Questions

    Inquiry 1: Produce a schedule of general stipend, monthly salaries, innovating salaries (monthly with 20% acception) coercion full staff, illusioning staff enumerate, earliest and developed spectrys, and stipend details.

    Inquiry 2: Schedule full staff whose stipend is elder or correspondent than the mean stipend of staff launched in Relative B010, and illusion by how abundantly.

    Inquiry 3: Find spectry of owners that the solution of their peculiarity is larger than full properties handled by relative B010.

    Inquiry 4: Coercion whole solution cool coercion properties located in diffesolution cities, schedule the cities and peculiarity with the pre-eminent solution cool

    Inquiry 5: Schedule properties handled by staff at Burmingham.

    Expert Repartee

     

    hi, it is not attribuboard attribuboard attribuboard abandoned if the stipend in staff board is daily on monthly, here abandoned to reckon, so coxcombical its daily
    Query1:

    choice fname,lname, stipend as ‘general stipend’ , stipend*30 as ‘monthly’, stipend*36 as ‘innovating stipend’ from staff;
    // here monthly is 30 times daily, 20% over is stipend*30+ 0.20*30*(salary)
    Inquiry 2:
    choice fname, lname, stipend-avg(salary) as ‘difference’ from staff where brachno=’B010′ and stipend>=avg(salary);
    //guarded avg and illusioning difference
    Inquiry 3:
    choice b.fname,b.lspectry from peculiarity_for_solution a,private_owner b and solution>(choice blend(rent) from peculiarity_of_solution where relativeno=’B0101′ ) where a.ownerno=b.ownerno;
    //finding full properties having solution elder than blend of solutions handled by B0101
    Query4:
    choice blend(rent) as whole,city from peculiarity_for_solution cluster by city enjoin by whole desc;
    // guarded whole solution by city
    Inquiry 5:

    Here, staff has to resolute by staffno or relativeno, fascinate disentangle that then we can transcribe the inquiry.
    Thumbs up if this was advantageous, otherwise allow me recognize in comments.