Table
employees
10 columns · 2 foreign keys · referenced by 0 tables
Columns
| # | Name | Type | Key |
|---|---|---|---|
| 01 | emp_id | SERIAL | PK |
| 02 | first_name | VARCHAR(50) | |
| 03 | last_name | VARCHAR(50) | |
| 04 | VARCHAR(120) | ||
| 05 | dept_id | INT | FK |
| 06 | manager_id | INT | FK |
| 07 | hire_date | DATE | |
| 08 | salary | NUMERIC | |
| 09 | job_title | VARCHAR(100) | |
| 10 | status | VARCHAR(20) |
Outgoing references
- dept_id — references another table
- manager_id — references another table
Referenced by
No tables reference this one.
Example queries against this table
- Select all columns from employees tableSQL
SELECT * FROM employees; - Select specific columns: first_name, last_name, salarySQL
SELECT first_name, last_name, salary FROM employees; - Select distinct job titles from employeesSQL
SELECT DISTINCT job_title FROM employees ORDER BY job_title; - Select top 10 highest paid employeesSQL
SELECT first_name, last_name, salary FROM employees ORDER BY salary DESC LIMIT 10;