The WHERE clause is used to filter rows in a SQL query based on specific conditions. It restricts the data that is retrieved from the database.
The correct SQL query to sort employees by their last_name in ascending order is SELECT * FROM employees ORDER BY last_name ASC;. The ASC keyword specifies ascending order, which is also the default if not explicitly stated.
The correct SQL query to retrieve rows where the salary is greater than 50000 is SELECT * FROM employees WHERE salary > 50000;
The ORDER BY clause is used to sort the result set of a query based on one or more columns in ascending or descending order.