18.1 Basic Elements: SELECT, FROM, WHERE, ORDER BY
Most databases you will have access to are based on a language called Structured Query Language (SQL). SQL is a language for creating, modifying, selecting, and deleting the tables, rows, fields, and data stored within a DBMS. Unless you are the database administrator, the primary use you will have for SQL is in "selecting" (i.e. querying) the data. Fortunately, SQL is fairly consistent across all DBMSs. Therefore, it is a perfect skill for you to learn in this class. Watch and follow along with the video tutorials below. The new concepts covered in each video are found below the problem.
-
Write a SQL statement that will return all employee names (first, last) only.
-
Write a SQL statement that will find all employees who have an “Average” Performance Rating.
- WHERE
-
Write a SQL statement that will show all the employees that make $75,000 or more. Display Last Name, First Name, Hire Date, Salary. Order by Salary in descending order.
- numbers versus text
- >=
- ORDER BY
-
Write a SQL statement that will show all employees hired after 12/31/1995. Order by hire date in ascending order. Display Last Name and Hire Date.
- #dates#
-
Write a SQL statement that will show all the employees that have a last name that starts with A or M. Display Last Name, First Name, and Performance. Order by Last Name.
- wildcard *
- LIKE