You want to retrieve a list of employees in alphabetical order of Lastname from the Employees table. Which SQL statement should you use? SELECT * FROM Employees GROUP BY Lastname; SELECT * FROM Employees ORDER BY Lastname; SELECT * FROM Employees ORDER BY Lastname DESC; SELECT * FROM Employees SORT BY Lastname;
Added by Lucy Y.
Step 1
This means we need to sort the data. In SQL, the command to sort data is ORDER BY, not GROUP BY or SORT BY. Show more…
Show all steps
Close
Your feedback will help us improve your experience
Lucas Finney and 76 other Intro Stats / AP Statistics educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a sequence of operations to answer the query. Also, provide an answer to the query. Use Tables 3.6.4–3.6.7 Find the names of all employees who are managed by Jones.
Functions, Sequences, and Relations
Relational Databases
1. Write an SQL query to fetch the no. of workers for each department in the descending order.
Muhammad J.
Write a sequence of operations to answer the query. Also, provide an answer to the query. Use Tables 3.6.4–3.6.7 Find the names of all employees. (Do not include any managers.)
Recommended Textbooks
Elementary Statistics a Step by Step Approach
The Practice of Statistics for AP
Introductory Statistics
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD