0% found this document useful (0 votes)
7 views5 pages

Data Insert: Employee Table

The document contains information about employee, department, and product tables as well as SQL queries to retrieve data from those tables based on certain criteria like department name, product type, employee hire date range and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Data Insert: Employee Table

The document contains information about employee, department, and product tables as well as SQL queries to retrieve data from those tables based on certain criteria like department name, product type, employee hire date range and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Data Insert

Employee table

Department Table
Product table

Hire table
SQL QUERIES

1. SELECT * FROM `lgdepartment` ORDER by depart_name ASC LIMIT 8

2. SELECT
product.SKU,product.name,product.type,product.base,product.description,product.price
FROM product WHERE prod_base = 'water' AND prod_category = 'sealer'

3. SELECT employee.emp_fname,employee.emp_lname,employee.email
FROM employee
JOIN hire_date ON hire_date.hire_id = employee.hire_id
WHERE hire_date.hire_date BETWEEN '2005-01-01' AND '2014-12-31'

4. SELECT
employee.emp_fname,employee.emp_lname,employee.Emp_contact,lgdepartment.depart_na
me,lgdepartment.depart_id
FROM employee
JOIN lgdepartment on employee.depart_id = lgdepartment.depart_id
WHERE lgdepartment.depart_id = 300 or lgdepartment.depart_name='clerk1'
ORDER by employee.emp_lname ASC
5. SELECT
emp_id,emp_fname,emp_lname,Emp_contact,salary_from_date,salary_end_date,Emp_salary
FROM employee
WHERE emp_id = 83731 or emp_id = 83745 or emp_id = 84039
ORDER BY emp_id, salary_from_date ASC

You might also like