The document outlines the SQL commands to create and manage 'employee' and 'project' tables, including dropping existing tables, creating new tables with specified fields, and inserting records into these tables. It also includes SQL queries to select specific data from the tables based on various conditions. The document contains several syntax errors and incomplete statements that need correction.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
12 Feb SQL Queries for Lab
The document outlines the SQL commands to create and manage 'employee' and 'project' tables, including dropping existing tables, creating new tables with specified fields, and inserting records into these tables. It also includes SQL queries to select specific data from the tables based on various conditions. The document contains several syntax errors and incomplete statements that need correction.
p.end_dat FROM employee e, project WHERE e.employee_id = p.employee_id and e.position = 'HR Manager’
3. select the first_name and last_name ,
project_name, start_date and end_date columns where the employee's department is ‘Marketing' and the project's start_date is on or after January 1, 2024 /
select e.first_name, e.last_name, p.project_nam
, p.start_date, p.end_dat from employee e, project p where e.employee_id = p.employee_i and e.department = 'Marketing' and p.start_date >= date ‘2024-01-01'
4. Write SQL query to select the first_name,
last_name project_name, start_date and end_date columns from employee and project tables where employees working in the Marketing departmen and employees with the position of Marketing Specialist also projects with a start date on or after January 1, 202
p.end_dat from employee e, project p where e.employee_id = p.employee_i and e.department = 'Marketing' and e.position = 'Marketing Specialist and p.start_date >= date ‘2024-01-01'
5. Write SQL query to select the first_name,
last_name project_name, start_date, and end_date columns from the employee and project tables where employee working in the Finance department, the position of Financial Analyst and projects with an end date on or before May 30, 202
p.end_dat from employee e, project p where e.employee_id = p.employee_i and e.department = 'Finance and e.position = 'Financial Analyst and p.end_date <= date '2024-05-30' e