Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Mondira_Roy.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*Part-1*/

select productName,productLine,buyPrice from products;

select productName as "Name",productLine as "Product Line",buyPrice as "Buy Price" from products;

select productName as "Name",productLine as "Product Line",buyPrice as "Buy Price" from products
order by buyPrice DESC;

/*Part-2*/
select contactFirstName,contactLastName,city from customers where country='Germany';

select contactFirstName as 'First Name',contactLastName as 'Last Name',city as 'City' from customers where country='Germany';

select contactFirstName as 'First Name',contactLastName as 'Last Name',city as 'City' from customers where country='Germany'
order by contactLastName;

/*Part-3*/
select DISTINCT status from orders;

SELECT DISTINCT(status) AS Status
FROM orders
ORDER BY status ASC;

/*Part-4*/
select * from payments where paymentDate > '2005-01-01';

select * from payments where paymentDate > '2005-01-01' order by paymentDate;

/*Part-5*/
select lastName, firstName,email,jobTitle from employees Inner Join offices on employees.officeCode = offices.officeCode
where city='San Francisco' ;

select lastName, firstName,email,jobTitle from employees Inner Join offices on employees.officeCode = offices.officeCode
where city='San Francisco' order by lastName;

/*Part-6*/
select productName,ProductLine,productScale, productVendor from products where productLine LIKE '%cars';

SELECT productName, productLine, productScale, productVendor
FROM products
WHERE productLine LIKE '%cars'
ORDER BY productLine DESC, productName ASC;