Question

write and test a query to list the name and the total compensation(salary+commission) of all the...

write and test a query to list the name and the total compensation(salary+commission) of all the instructors.Unknown commission should be treated as zero.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
empno [Primary key], name, salary, commission, deptno

create table myemp
( 
     empno number primary key,
     name varchar2(20),
     salary number,
     commission number,
     deptno number
);
select
    name, (salary + ((salary*commission) / 100)) as "total_salary" 
from myemp;
Add a comment
Know the answer?
Add Answer to:
write and test a query to list the name and the total compensation(salary+commission) of all the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Write a query to list the first name and last name of those pilots who...

    1. Write a query to list the first name and last name of those pilots who were hired after January 1, 2010. Sort your result by the ascending order of last name. Within matching last names, order by first name. 2. Write a query to list flight number, pilot number, pilot last name for all flights whose destinations are using the IN keyword. 3. Write a query to list the names and telephone numbers of the passengers who have reservations...

  • SQL query: Write a SQL statement using the employees table and retrieve employees whose monthly salary...

    SQL query: Write a SQL statement using the employees table and retrieve employees whose monthly salary (including their commission) is greater or equal to 5,000 but less than or equal to 17,000 (we are assuming the salary on the table is monthly). In other words, if their monthly salary was 1000 and their commission was .2, their total monthly salary would be 1200 and given the criteria above this instance would not be selected. Please display the full name of...

  • Write a Java® application, using NetBeans IDE, that calculates the total annual compensation of a salesperson....

    Write a Java® application, using NetBeans IDE, that calculates the total annual compensation of a salesperson. Consider the following: A salesperson will earn a fixed salary of $30,000. A salesperson will also receive a commission as a sales incentive. Commission is a percentage of the salesperson's annual sales. The current commission is 7% of total sales. The total annual compensation is the fixed salary plus the commission earned. he Java® application should meet the following technical requirements: The application should...

  • Query 1-1 Display realtor staff number, name, position, annual salary as Annual Salary and monthly salary...

    Query 1-1 Display realtor staff number, name, position, annual salary as Annual Salary and monthly salary as Monthly Salary. Round monthly salary to 2 decimal places. Sort output by staff number ascending. Numb Staff Name                               Position             Annual Salary Monthly Salary ---- ---------------------------------------- -------------------- ------------- -------------- Query 1-2 For rental properties that have been rented for less than the listing rental rate (REN_RATE), display rental property number, street, city, state, zip, the listing rent rate and actual rental rate. Prop Street                   ...

  • "write a query to list name, userID, password based on the given name"; Need Help

    "write a query to list name, userID, password based on the given name"; Need Help

  • (TCO 6) Write a query to list the customer first name, last name as a single...

    (TCO 6) Write a query to list the customer first name, last name as a single field with a heading of Customer along with the balance sorted by balance from lowest to highest. SalesRep Customer PK ReplD PK varchar(20) varchar(20) decimal(10,2) CustomerID int -OH Last Name FirstName Last Name varchar(20) Commission Rate FirstName varchar(20) Street varchar(20) City varchar(20) Order State char(2) Zipcode char(5) HO. ---OPK OrderID Balance decimal(10,2) ReplD int FK1 CustomeriD OrderDate ShipDate Part int int date date PK...

  • Query “Sales.Store” table to obtain the list of “Name” and “SalesPersonID” where the store name starts...

    Query “Sales.Store” table to obtain the list of “Name” and “SalesPersonID” where the store name starts with the letters “g” through “j” and the SalesPersonID is greater than 283. Make sure that the list is sorted by “SalesPersonID” and then by “Name” fields in a descending order. Be sure the query returns all the required rows.

  • QUERY 5. You are interested in knowing what the salary difference is between CLARE and her...

    QUERY 5. You are interested in knowing what the salary difference is between CLARE and her boss. Write a query to output the following:- CLARE’S Name, her bosses name, department name, and the difference between her managers salary and her salary Answer:- Clare Boss DeptName Salary Difference Clare Ned Marketing $23,000.00

  • Create a copy of Total Balance By Client query. Name the query Total Bslances By State....

    Create a copy of Total Balance By Client query. Name the query Total Bslances By State. Open the query in design view and remove the client name the query. Add grouping by the clients state

  • write SQL code to list the employee first name, last name, and salary from the employee...

    write SQL code to list the employee first name, last name, and salary from the employee table and the department from the jobs table

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT