Saturday, 21 March 2009

Sample Applications (A1 .... A6)

These are sql queries you need to write for sample applications.

For A5 and A6 you need to create an html page to do the wanted queries. I just put here one sample of each, but to get different results, you need to change the queried word or phrases.

I hope this will help you.

Good luck with it!

-------------------------------------

A1.

select employees.name from employees, city
where city.population>40000
and employees.city=city.city_name;


A2.

select projects.project_name, employees.name
from projects, engineer, employees
where projects.est_cost>2000000
and employees.employee_id=engineer.employee_id
and engineer.type_of_degree='mechanical';


A3.

select employees.name, married.to_whom
from employees, married, projects
where employees.employee_id=married.employee_id
and employees.projects like '%London%';

A4.

select employees.city
from employees, secretary
where employees.current_job='secretary'
and secretary.typing_speed>80;

A5.

select name, address
from employees
where skills like 'prepare%'
or skills like '%prepare%';

A6.

select name, address
from vendors
where equipment_type='soil densimeter';


-------------------------------------

Note: These queries will work on the database we created in one of the last posts.

Max