0% found this document useful (0 votes)
3 views

assign

The document outlines SQL queries related to a project by Abhishek Manchanda, including selecting employee details from the 'Employees' table, updating employee information, and retrieving data through various joins with conditions. It focuses on employees in Toronto, specific updates to employee records, and product management statistics. The queries also filter results based on assigned dates, department sizes, and manufacturing costs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

assign

The document outlines SQL queries related to a project by Abhishek Manchanda, including selecting employee details from the 'Employees' table, updating employee information, and retrieving data through various joins with conditions. It focuses on employees in Toronto, specific updates to employee records, and product management statistics. The queries also filter results based on assigned dates, department sizes, and manufacturing costs.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Abhishek Manchanda

Western ID: amancha

Student Number: 251295106

Project 1

A) SELECT
ID, LastName, FirstName, phone, email
FROM
Employees
WHERE
City=”Toronto”;

B) UPDATE
Employees
SET
FirstName=“Abhishek”, LastName=“Manchanda”, Address=“Southcourt Cott”,
email=“[email protected]
WHERE
ID=3137;

C) SELECT
FirstName, LastName, email, Assigned Date, DepartmentSize
FROM
(Employees
INNER JOIN
manages ON manages.EmpID = Employees.ID)
WHERE
AssignedDate LIKE “2022-Jan-*”;

D) SELECT
ProductName, PerProductManufacturingCost, DepartmentSize, AssignedDate
LastName, FirstName
FROM
(( manages
INNER JOIN
Product ON manages.ProductID = Product.ProductID)
INNER JOIN
Employees ON manages.EmpID = Employees.ID)
WHERE
DepartmentSize >= 100 AND DepartmentSize < 200;

E) SELECT
COUNT(ProductName) AS [Product Totals]
FROM
(( manages
INNER JOIN
Product ON manages.ProductID = Product.ProductID)
INNER JOIN
Employees ON manages.EmpID = Employees.ID)
WHERE
FirstName=“Abhishek” AND LastName=“Manchanda”;

F) SELECT
FirstName, LastName, Phone, AssginedDate, [Location Name], ProductName
FROM

((( manages

INNER JOIN
Location ON manages.LocationID = Location.ID)
INNER JOIN
Product ON manages.ProductID = Product.ProductID)
INNER JOIN
Employees ON manages.EmpID = Employees.ID)

WHERE

PerProductManufacturingCost > 75 AND [Location Name] LIKE “K*”;

You might also like