Theory Questions
What is SQL?
What are the main types of SQL statements?
What is a relational database?
Explain the difference between INNER JOIN and LEFT JOIN.
What is a primary key?
What is normalization?
What is an aggregate function?
Explain the difference between GROUP BY and HAVING clauses.
What is a subquery?
What is a foreign key?
Data Analysis with SQL PPT
Programming Questions
Given a table named “Sales” with columns “product_id,” “date,” and “revenue,” how can you retrieve the total revenue for each product for the year 2022?
How can you retrieve the distinct values of the “category” column from the “Products” table?
How can you calculate the average salary of employees in the “Employees” table?
Given a table named “Orders” with columns “order_id,” “order_date,” and “total_amount,” how can you retrieve the orders placed in August 2023
If you want to list the top 5 highest-paid employees from the “Employees” table, how can you achieve this?
How can you retrieve the number of orders placed by each customer from the “Orders” table?
If you have a table named “Students” with columns “student_id” and “score,” how can you find the average score?
How can you find the maximum and minimum salary in the “Employees” table?
How can you retrieve the names of employees who have a salary greater than $50,000?
If you want to retrieve all customers who have placed at least three orders, how can you achieve this?
Output Questions
How can you retrieve all columns from a table named “Customers”?
What is the purpose of the DISTINCT keyword in a SELECT statement?
How do you filter records using the WHERE clause?
How do you sort the result set in descending order using the ORDER BY clause?
What is the purpose of the GROUP BY clause?
How can you retrieve the total count of records in a table?
What is an alias in SQL and how is it used?
How can you join two tables using an INNER JOIN?
How can you delete records from a table using the DELETE statement?
How do you perform pattern matching in SQL?