Download presentation
Presentation is loading. Please wait.
Published byZaria Lemmons Modified over 10 years ago
1
CST221: Database Systems (II) Dr. Zhen Jiang Computer Science Department West Chester University West Chester, PA 19383
2
Querying Creation (Query wizzard) Save Use
3
Wildcard (*, ?), page AC87 Use criteria for a field not included in the result list, page AC88 Parameter Query, page AC89 Join table, page AC103 Comparison Operator, page AC94 Compound criterion (AND, OR), page AC 95 Sorting, page AC97 Omitting duplicates, page AC 100 Multiple keys (high priority from left to right), page AC101 Top-value query, page AC 102 Calculated field, page AC 113 Calculating Statistics (built-in statistics, group), page AC 117
4
Exercise 2
9
Show the name and age and salary of all employees who are younger than 25.
10
Double click the items to include in the list
14
Add criteria to meet the certain requirement
16
Datasheet view Design view
18
Hidden column for criteria (not displayed in the list)
19
Wildcard (*, ?), such as Ber* in City field Use criteria for a field not included in the result list, disabled show property One table, decide it early and add all fields at the beginning Comparison Operator, such as >10000 in amount paid field Compound criterion (AND => 1 row, OR => another row) Sorting Omitting duplicates, unique record in property sheet Multiple keys (high priority from left to right) Top-value query, return in top design view (very early stage) Calculated field, zoom in shortcut menu (e.g., type Total Amount:[Amount Paid]+[Current Due]) Calculating Statistics (built-in statistics, group by)
20
Show the Enum, name, salary of all employees whose names have 5 letters.
26
Show the name, Enum,salary, and age of all employees with a salary > $40,000 AND younger than 25
32
Show the Enum of all employees sorted by salary in the ascending order
33
Hidden column for criteria (not displayed in the list)
35
List all different Dnum, without duplicates.
39
List top 5 high paid employees.
42
List the LName of all employees in the department (Dnum) entered by the user.
50
List the LName of all employees with a new column labeled hiring age, which has a value by subtracting the years of working (wYears) from the current age (age).
56
List the max, min, and average of salary for all employees.
63
Joint table (AC 105-109) Dept DnumDnameCity D22Web WC D25Databases NY D28Software LA Emp EnumLNameagesalaryDnumwYears E101Jones45$56,000.00D2512 E202Anders66$46,000.00D2225 E303Smith34$25,000.00D229 E404Rivera22$30,000.00D251 E505Brown45$80,000.00D2517 E606Caldwell52$70,000.00D2820 E707Stiles44$65,000.00D2811 E808Walker48$90,000.00D2221 E909Hartman20$25,000.00D281 E222Carter29$35,000.00D253
64
For each employee, print out the department name.
71
Assignment 2
72
Statistics of an group Exercise 3
73
Show the average age (label as average age) and average salary (label as average salary) for all employees
79
Show the max, min and average age for all employees in Dept Software
83
Still incorrect!
86
Join Table (AC 105)
87
For all employees under 30, show a count of these employees and their average salary.
89
For all employees in department D22 or D28, show a count of these employees, their average age, and maximum salary
96
For each department list avg, max and min age, along with a count of employees in each department.
101
For each department find a count and average salary for all employees younger than 40.
106
For each department with an average salary of >40000 list the dnums, employee count for these departments.
109
For each department with less than 4 employees, show the average age and number of employees.
112
For each department with more than 2 people over 40 list deptNum, and a count of these people.
115
Assignment 3
116
Maintenance Record addition, page AC 144 Search, page AC 145 Record update, page AC 147 Record deletion, page AC 148 Filter, page AC 149
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.