Sie sind auf Seite 1von 5

COMPUTER APPLICATIONS LEVEL 50 DATABASES QUERIES

COST DATABASE 1. In the COSTS file create a field named TOTAL . Use appropriate facilities provided by the database program to calculate the total cost of each item.

2.

Perform the following queries: a. List all items that cost more than 250. COSTS2 b. List all items that cost less than 250. c. List the items with quantities more than or equal to 25. d. List all items their serial number and total. !ort on I"#$. COSTS# e. %alculate the total cost of all products. TOTALCOST f. %alculate the average cost of all products. COST g. 'hat is the most costly product( COSTL& h. 'hich product is the least e)pensive( C'EAP (Save (Save (Save (Save as

(Save as COSTS! (Save as COSTS" (Save as

&Save as as A$% as as

*.

%reate the following (A)E*TABLE queries+ , table showing the +tem and Total. !ort in ascending order by +tem. +TE( TOTAL .

a. !ave as b. order by

, table showing the +tem ,uantit- and Serial .o. !ort in descending Serial .o. !ave as +TE( ,/A. SE0.

COMPUTER APPLICATIONS LEVEL 50 DATABASES QUERIES

CL/B DATABASE
1.

In the %LU- file create a field name O1+.%. %alculate the total dues owing by member if each should pay .100.

each 2. (ALE b. old. List the name and address of all female club members that are 10 years (Save as 2E(ALE /erform the following queries+ a. List the name age and address of all male club members. (Save as

c. List the name and address of all persons that are 15 years old. (Save as &O/.% d. old. e. f. g. *. List the names and address of all the males that are more than 15 years (Save as SE.+O0S 1ow many individuals paid all their dues. (Save as 2/LL PA& %alculate the total dues collected. (Save as D/ES COLLECTED %alculate the total dues owing. (Save as D/ES O1+.%

%reate the following (A)E*TABLE queries+ , table showing the names and total owing for those individuals with a !ort in ascending order by Last 2ame. !ave as D/ES .A(ES.

a. balance.

b. , table showing the names of all the females and their complete information. !ort in descending order by I3 24. !ave as 2E(ALES CO(PLETE.

COMPUTER APPLICATIONS LEVEL 50 DATABASES QUERIES


c. , table showing all the names of the males and their complete information. !ort in ascending order by 3ues. !ave as (ALES CO(PLETE.

COMPUTER APPLICATIONS LEVEL 50 DATABASES QUERIES

B0A.C' DATABASE 1. In the TELEP'O.E file create a field called SALA0& . %alculate the salary for each branch if each staff member for each branch is paid .1 500. 2. Perform the following queries: a. b. c. d. e. f. g. h. *. List the branches found in %alifornia and their telephone number. (Save as P'O.E5 List the branches that have a staff that is equal to or greater than 15. &Save as B0A.C'ES2 List the branches that have a staff that is equal to or less than 16. (Save as B0A.C'ES! List all branches their location and telephone number. !ort on !","#. (Save as B0A.C'ES " %alculate the total amount that should be paid out as salaries. (Save as TOTAL PA& %alculate the average salary of the branches. (Save as A$% PA& 'hat is the highest amount paid out as salaries( (Save as '+%' PA& 'hat is the lowest amount paid out as salaries( (Save as LO1 PA&

%reate the following (A)E*TABLE queries+ , table showing all the information for the Bran3hes in %A. !ave as B0A.C'ES. b. , table showing the names of all the Bran3hes their location &Cit- an4 and the Tele5hone .um6ers. !ort in ascending order using Bran3h.

a. %EO0%+A

State5 !ave as B0A.C'ES +.2O7

COMPUTER APPLICATIONS LEVEL 50 DATABASES QUERIES


c. , table showing all the Bran3hes the State and .o7 on Staff. !ort in descending order by State. !ave as B0A.C' STA22 .

Das könnte Ihnen auch gefallen