/* Lab 3
   Philip Bock */

use Pubs;

-- Question 1
select title, price from titles where price between 10 and 12;

-- Question 2
select pub_name, city from publishers where state in ('MA', 'CA');

-- Question 3
select title_id, type, advance, royalty, ytd_sales from titles
where ytd_sales not between 1000 and 10000;

-- Question 4
select au_lname, address, city from authors where address like '%Av%';

-- Question 5
select fname, lname, hire_date from employee where SUBSTRING(emp_id, 9, 1) = 'F';

-- Question 6
select * from jobs where job_desc not like '%Manag%';

-- Question 7
select * from employee where DATEPART(yyyy, hire_date) = '1994';

-- Question 8
select title, type from titles where title like '%the%';

-- Question 9
select stor_id, ord_num, ord_date from sales
where DATEPART(yyyy, ord_date) = '1992' or (qty > 12 and payterms like '%60');

-- Question 10
select title_id, type, price from titles
where advance > 4000 and price > 12 and DATEPART(yyyy, pubdate) != 1991;
