Question:1 Show all data from employee table where name should be in ascending and salary in descending order. Show the total length of (eno. deptno), (Employee Number, department Number) joined it and rename by funetion from the employee table? Show the ename (employee name) first 3 alphabets of manager? Write a query that show the manager data like this. ename JONES job *** MANAGER BLAKE ***MANAGER

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter2: Database Design Fundamentals
Section: Chapter Questions
Problem 5TD
icon
Related questions
Question

Create Dept_no

CREATE TABLE employee (
eid INTEGER PRIMARY KEY,
name TEXT NOT NULL,
AGE INTEGER NOT NULL,
salary INTEGER NOT NULL
7 );
INSERT INTO employee VALUES (1, 'Ryan', 26, 30000);
INSERT INTO employee VALUES (2, 'Joanna', 30, 45000);
INSERT INTO employee VALUES (3, 'Mark', 35, 75000);
INSERT INTO employee VALUES (4, 'Anthony', 24, 35000);
12 INSERT INTO employee VALUES (5, 'Lisa', 24, 60000);
13 INSERT INTO employee VALUES (6, 'Henry', 50, 250000);
SELECT * FROM employee ORDER BY name ASC, salary DESC;
3
4
6
Transcribed Image Text:CREATE TABLE employee ( eid INTEGER PRIMARY KEY, name TEXT NOT NULL, AGE INTEGER NOT NULL, salary INTEGER NOT NULL 7 ); INSERT INTO employee VALUES (1, 'Ryan', 26, 30000); INSERT INTO employee VALUES (2, 'Joanna', 30, 45000); INSERT INTO employee VALUES (3, 'Mark', 35, 75000); INSERT INTO employee VALUES (4, 'Anthony', 24, 35000); 12 INSERT INTO employee VALUES (5, 'Lisa', 24, 60000); 13 INSERT INTO employee VALUES (6, 'Henry', 50, 250000); SELECT * FROM employee ORDER BY name ASC, salary DESC; 3 4 6
Practical Tasks for Database Systems
Question:1
Show all data from employee table where name should be in ascending and salary in
descending order.
Show the total length of (eno. deptno). (Employee Number, department Number) joined it
and rename by funetion from the employee table?
Show the ename (employee name) first 3 alphabets of manager?
Write a query that show the manager data like this.
job
*** MANAGER
ename
JONES
BLAKE
***MANAGER
Transcribed Image Text:Practical Tasks for Database Systems Question:1 Show all data from employee table where name should be in ascending and salary in descending order. Show the total length of (eno. deptno). (Employee Number, department Number) joined it and rename by funetion from the employee table? Show the ename (employee name) first 3 alphabets of manager? Write a query that show the manager data like this. job *** MANAGER ename JONES BLAKE ***MANAGER
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning