The text outlines steps for querying updated salary records from an employee database. It emphasizes using SQL commands like SELECT, FROM, and WHERE to extract relevant data such as employee IDs, names, and salaries from a specified table.
Find the last time each bike was in use. Output both the bike number and the date-timestamp of the bike's last use (i.e., the date-time the bike was returned). Order the results by bikes that were most recently used.
FROM
dc_bikeshare_q1_2012
ORDER BY
end_time [DESC]
SELECT
bike_number,
end_time,
Finding Updated Records
Find the current salary of each employee assuming that salaries increase each year.
GROUP BY
WHERE
WHEREcondition;
FROM
FROMtable_name;
Subtopic
SELECT
SELECTcolumn1, column2, ...
id, first_name, last_name, salary, department_id
Table Name: ms_employee_salary
id: int
first_name: varchar
last_name: varchar
salary: int
department_id: int