-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTarea01.sql
More file actions
39 lines (33 loc) · 915 Bytes
/
Copy pathTarea01.sql
File metadata and controls
39 lines (33 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*Tarea:
5 examinar para practicar SELECT Y 5 tablas diferentes
Daniela Valencia Gómez*/
/*Tabla ORDERS*/
SELECT requiredDate, orderDate, status
FROM orders
WHERE
status IN ('Shipped','Cancelled')
ORDER BY requiredDate ASC;
/*Tabla Payments*/
SELECT checkNumber, amount
FROM payments
WHERE
amount >= 10000 AND amount <=100000
ORDER BY amount, checkNumber ASC;
/*Tabla Offices*/
SELECT city, addressLine1, country, postalCode
FROM offices
WHERE
city in ('Boston', 'NYC', 'Sydney', 'London')
ORDER BY postalCode,city ASC;
/*Tabla ORDERDETAILS*/
SELECT productCode, quantityOrdered, priceEach
FROM orderdetails
WHERE
quantityOrdered >= 30 AND quantityOrdered <=100
ORDER BY productCode, quantityOrdered ASC;
/*Tabla Employees*/
SELECT lastName, employeeNumber, jobTitle,email
FROM employees
WHERE
jobTitle in ('President', 'Sales Rep','VP Sales') and employeeNumber <=2000
ORDER BY lastName, firstName, email;