Software Engineer Test2
Software Engineer Test2
1. Which MySQL function would you use to concatenate strings from multiple
rows into a single string?
CONCAT_WS
GROUP_CONCAT
CONCAT
STRING_CONCAT
WINDOW
OVER
PARTITION
WITH
DROP INDEX
DELETE INDEX
SQL Questions 1
REMOVE INDEX
ERASE INDEX
ALTER INDEX
MODIFY INDEX
ADD INDEX
CREATE INDEX
7. Which JOIN type in MySQL is suitable for combining rows from two tables
even if there is no match found in the other table?
INNER JOIN
LEFT JOIN
RIGHT JOIN
8. In SQL, what is the typical syntax for using the LAG function?
LAG(column_name)
LAG(column_name, n)
LAG(n, column_name)
LAG()
9. Question - 1:
Consider the following scenario where you have a table named
"employees" in a MySQL database. The table has the following structure:
SQL Questions 2
CREATE TABLE employees (
emp_id INT PRIMARY KEY,
emp_name VARCHAR(50),
department_id INT,
salary DECIMAL(10, 2),
hire_date DATE
);
10. Question - 2
The ideal time between when a customer places an order and when the
order is delivered is below or equal to 45 minutes.
You have been tasked with evaluating delivery driver performance by
calculating the average order value for each delivery driver who has
delivered at least once within this 45-minute period.
Your output should contain the driver ID along with their corresponding
average order value.
Table: Delivery_details
SQL Questions 3
driver_id INT,
restaurant_id INT,
consumer_id INT,
is_new BOOLEAN,
delivery_region VARCHAR(255),
is_asap BOOLEAN,
order_total FLOAT,
discount_amount FLOAT,
tip_amount FLOAT,
refunded_amount FLOAT
);
SQL Questions 4