Вы находитесь на странице: 1из 1

--Write a query to display all columns from Employees table

select*from Employees
--Write a query to display Employee First Name , city and country
select firstname,city,country from Employees;
--Write a query to display Employee Id, Name, Date of Birth who are from United Kingdom
select employeeid,lastname,firstname,birthdate,city from Employees
where (country='uk');

--Write a query to display all columns whose company name starts with letter F
select *from contacts
where companyname like 'F%'

--Write a query to display customers who live in state Oregon(OR),USA


select*from Customers
where (country='usa' and region='or')

--Write a query to display OrderId,CustomerId whose freight is greater than 50


select orderid,customerid,Freight from Orders
where Freight>50;

--Write a query to display EmployeId, EmployeeName, Date of Birth who are born after 1960
select EmployeeID, year(BirthDate),firstname,lastname,birthdate from Employees
where year(birthdate) >1960

--Write a query to display Employee ID, name who are sales Representative
select EmployeeID,firstname,lastname,Title from Employees
where title='sales Representative';

Вам также может понравиться