This question asks for a cursor that will print the id, start, and end times for each row in a table. The input table has three columns: id, start, and end. The example output should print the id and start and end times for each row in the table, as shown in the example output.
This problem asks the reader to write a cursor to update the prices of all products in a table by 10%. The table is provided as input, and the expected output is also shown.
Write a SQL query to find the products that have been in stock for more than 365 days.
This problem asks the user to write a cursor that will loop through a table of employee information and print the employee ID and name for each employee.
To find the employees who have been with the company for more than 5 years, we can write a SQL query that uses the StartDate column in the table to filter the results.
This technical problem deals with calculating the average salary for each department using a cursor. Given a table of employees and their salaries, the cursor will iterate over the table and calculate the average salary for each department. The output will be a table with the department ID and the corresponding average salary.
Given a table of customer data, write a SQL query to find the names of all customers who live in the same city as the customer with the name 'John Smith'.
This problem asks the reader to write a cursor that will iterate over a table and print the name and age of each row.