-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab4_ex2.sql
More file actions
59 lines (50 loc) · 1.18 KB
/
lab4_ex2.sql
File metadata and controls
59 lines (50 loc) · 1.18 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
SELECT last_name, job_id, salary AS Sal
FROM employees;
*/
/*
SELECT *
FROM job_grades;
*/
/*
SELECT employee_id, last_name
sal x 12 ANNUAL SALARY
FROM employees;
-- The EMPLOYEES table does not contain a column called sal. The column is called
SALARY.
-- The multiplication operator is *, not x as shown in line 2.
-- The ANNUAL SALARY alias cannot include spaces. The alias should read
ANNUAL_SALARY or should be enclosed within double quotation marks.
-- A comma is missing after the LAST_NAME column. */
/*
DESCRIBE departments
SELECT *
FROM departments;
*/
/*
DESCRIBE employees
SELECT employee_id, last_name, job_id, hire_date StartDate
FROM employees;
*/
/*
SELECT DISTINCT job_id
FROM employees;
*/
/*
SELECT employee_id "Emp #", last_name "Employee",
job_id "Job", hire_date "Hire Date"
FROM employees;
*/
/*
SELECT last_name||', '||job_id "Employee and Title"
FROM employees;
*/
/*
SELECT employee_id || ',' || first_name || ',' || last_name
|| ',' || email || ',' || phone_number || ','|| job_id
|| ',' || manager_id || ',' || hire_date || ','
|| salary || ',' || commission_pct || ',' ||
department_id
THE_OUTPUT
FROM employees;
*/