Question

STORE (StoreID, StoreAddress, WeekDaysHours, WeekendHours) ACCOUNT (AccountNo., AccountName, Balance) DEPARTMENT (DepartmentID, DepartmentTitle, NoOfEmployees, AccountNo, StoreID, FranchiseTeamID)...

STORE (StoreID, StoreAddress, WeekDaysHours, WeekendHours)

ACCOUNT (AccountNo., AccountName, Balance)

DEPARTMENT (DepartmentID, DepartmentTitle, NoOfEmployees, AccountNo, StoreID, FranchiseTeamID)

FRANCHISE_APP (AppNumber, AppDate, DecisionDate, Status, DepartmentID, TeamID)

EMPLOYEE (EmployeeID, Name, Phone, Email, Address, Gender, DOB, JoiningDate, CentralOrLocalEmployment,

EFTPOSID, CANumber, DepartmentID) CASUAL_EMPLOYEE (EmployeeID, HourlyRate)

PART_TIME_EMPLOYEE (EmployeeID, WeeklyHours, Salary)

FULL_TIME_EMPLOYEE (EmployeeID, LeaveDays, Salary, MemberID)

TEAM_MEMBER (MemberID)

SHAREHOLDER (S.H.ID, Name, Phone, Email, Address, NoOfShares, MemberID)

TEAM (TeamID, TeamName, TeamLeaderID)

MEMBERSHIP (MemberID, TeamID, PercentageOfShare)


Question: (SQL Using ORACLE SQL*Plus)
1. List the team member details (member id and team id) who has the maximum credit to his name, based on his percentage of share in the team and the positive account balance of the franchising department.

Homework Answers

Answer #1

In SQL we use various commands to extract data from tables in efficient way. To find the maximum value of any particular I'd we use max command.

For example to find the average and salary for particular departments we use

BREAK ON DEPARTMENT_NAME SKIP 1
COMPUTE AVG LABEL 'Dept Average' -
        MAX LABEL 'Dept Maximum' -
        OF SALARY ON DEPARTMENT_NAME
SELECT DEPARTMENT_NAME, LAST_NAME, SALARY
FROM EMP_DETAILS_VIEW
WHERE DEPARTMENT_NAME IN ('Executive', 'Accounting')
ORDER BY DEPARTMENT_NAME;

Thus by using this command we can get the details

Know the answer?
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
Similar Questions
Consider the scenario where the company has to automate its systems and wants to store details...
Consider the scenario where the company has to automate its systems and wants to store details of its employees where their empno, name, salary, DoB, age, gender and panNo . empno is the primary key, phNo has to be stored. Age is a derived attribute . panNo is a simple attribute Each employee belongs to one the various departments (dno, dname) in the organization. It is mandatory for each employee to get the medical insurance. The insurance details are also...
Draw the scenario using Chen notation In a university, department offer courses. Department has instructors who...
Draw the scenario using Chen notation In a university, department offer courses. Department has instructors who teach courses. For a course, the instructor may or may not have a teaching assistant. Each department has a department name, a department code, 1-4 phone numbers, and an address. ◦ Each course has a course number (e.g., INFO605), a section number (e.g., 900), a title, a course type (e.g., online), and units. Each instructor has an instructor ID, first name, last name, gender,...
You have been asked to develop a database system for the Elijah Community Hospital. ECH is...
You have been asked to develop a database system for the Elijah Community Hospital. ECH is a small, local community hospital with approximately 125 beds. The basic goal is to provide high-quality, cost-effective health-care services for the surrounding community in North Georgia. The various business functions that the hospital currently has are: Patient care administration software-record keeping aspects of patient care Clinic and lab services software-provides lab testing and procedures and patient monitoring & screening Patient care software-provide patients with...
The queries listed below must be implemented with a set algebra operation. 1)Find the department name...
The queries listed below must be implemented with a set algebra operation. 1)Find the department name and code for all departments that only offered subjects that worth 6 credits. Note that a subject offered by a department means a lecturer of the department has been assigned to teach the subject. CREATE TABLE LPOSITION(    position       VARCHAR(20)   NOT NULL,   /* Position occupied       */    salary_level   CHAR   NOT NULL,       /* Salary level   */    CONSTRAINT LPosition_PKey PRIMARY KEY (position)...
1) Add to a relational table DEPARTMENT information about the total number of employees in each...
1) Add to a relational table DEPARTMENT information about the total number of employees in each department. Note, that if a department has not employee then for such a department the total number of employees must be set to zero (0). The total number of employees must be a positive number no more than 999. Use SELECT statement to list the contents of an extended relational table DEPARTMENT in the descending order of the total number of employees. Finally, remove...
a. Define the class bankAccount to store a bank customer’s account number and balance. Suppose that...
a. Define the class bankAccount to store a bank customer’s account number and balance. Suppose that account number is of type int, and balance is of type double. Your class should, at least, provide the following operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information. Add appropriate constructors. b. Every bank offers a checking account. Derive the class checkingAccount from the class bankAccount (designed in part (a)). This class...
A university is a very busy place with a lot of students and also a lot...
A university is a very busy place with a lot of students and also a lot of employees to keep the system running perfectly. All people in the university have basic information like name, address, email and phone number. Employees at the university have extra information like employee-id and salary. There are also faculty and staff who are employees at the university. Each faculty has a designation and is assigned to a specific college and has number of courses taught....
You are tasked to design the ER diagram for the database for the 3S clothing store....
You are tasked to design the ER diagram for the database for the 3S clothing store. Data requirements are as given below. • Information about 3S employees includes a unique employee ID, and his/her name and position. • Each customer of 3S is identified by a customer ID, and has a name. • Information about the suppliers of 3S include a unique name, and a contact phone number. • Clothes stocked by 3S are described by a product code, size,...
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these...
**[70 pts]** You will be writing a (rather primitive) online store simulator. It will have these classes: Product, Customer, and Store. All data members of each class should be marked as **private** (a leading underscore in the name). Since they're private, if you need to access them from outside the class, you should do so via get or set methods. Any get or set methods should be named per the usual convention ("get_" or "set_" followed by the name of...
A university is a very busy place with a lot of students and also a lot...
A university is a very busy place with a lot of students and also a lot of employees to keep the system running perfectly. All people in the university have basic information like name, address, email and phone number. Employees at the university have extra information like employee-id and salary. There are also faculty and staff who are employees at the university. Each faculty has a designation and is assigned to a specific college and has number of courses taught....