Sei sulla pagina 1di 3

PRACTICAL CASES

MIS374 - Accounting Information Systems (AIS)


Chapter (4)
Question 1 : Consider the following relation and answer the
questions below.

STUDENT
(ID, Name, Address, Phone)

 Required: Specify the following queries in SQL

1:Retrieve all students


2:Retrieve all students, showing only their IDs and names
3: Retrieve all students who live in “Mohandeseen”, ordered
alphabetically by student name
4: Retrieve students names concatenated with their
addresses, separated by a space. Name the column
heading “Student_Details”

Question 2: Consider the following relation and answer the


questions below

EMPLOYEE
(ID, NAME, BIRTHDATE , ADDRESS, SALARY)

 Required: Specify the following queries in SQL

1: Retrieve the birth date and address of the employee


whose name is „Mohamed Abdulla„
2: Retrieve the ID values for all employees
3: Retrieve all employees who earn 5600
4: Retrieve all employees whose salary is between 5600 and
6700
5: Retrieve distinct salaries

6: Retrieve all employees names whose address is in


Heliopolis.

TA: Aya Saeed


Question 3: Consider the following relation and answer the
questions below.

CUSTOMER
(ID, Name, Address, E-mail, Credit-limit)

 Required: Specify the following queries in SQL

1:Retrieve all customers


2: Retrieve customers IDs, names, and e-mails, ordered
alphabetically by customer name
3: Retrieve all customers having credit limits between
20000 and 30000
4:Retrieve distinct credit limits

Question 4: Consider the following relation and answer the


questions below.

INVENTORY
(ITEMNO, Name, COLOR,PRICE)

 Required: Specify the following queries in SQL

1:Retrieve all inventories


2: Retrieve all inventories showing only their names and
colors
3:Retrieve all inventories in blue, ordered alphabetically by
name
4: Retrieve inventories names concatenated with their
colors, separated by a space. Name the column heading
item details.

TA: Aya Saeed


Question 5: Consider the following relation and answer the
questions below.

WORKER
(ID, NAME, JOINING DATE, , SALARY,DEPARTMENT)

 Required: Specify the following queries in SQL

1: Retrieve all workers showing only their names and their


joining date
2: Retrieve the ID values for all workers
3: Retrieve all workers who earn greater than or equal 6000
4: Retrieve all workers whose salary is between 6000 and 8000
5: Retrieve distinct salaries
6: Retrieve all workers names who works in HR Department.

TA: Aya Saeed

Potrebbero piacerti anche