Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

SQL

The document discusses SQL concepts and interview questions about retrieving data from tables, filtering with WHERE and JOINs, aggregating with COUNT, SUM, and AVG, using subqueries and indexes, modifying data with INSERT, UPDATE, DELETE, and TRUNCATE, managing tables with CREATE, ALTER, and DROP, and implementing constraints and transactions.

Uploaded by

Sarath Ch
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

SQL

The document discusses SQL concepts and interview questions about retrieving data from tables, filtering with WHERE and JOINs, aggregating with COUNT, SUM, and AVG, using subqueries and indexes, modifying data with INSERT, UPDATE, DELETE, and TRUNCATE, managing tables with CREATE, ALTER, and DROP, and implementing constraints and transactions.

Uploaded by

Sarath Ch
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL

1. How do you retrieve all columns from a table?


2. What SQL statement is used to filter records?
3. How can you join two tables? Explain different types of JOINs.
4. What is the difference between WHERE and HAVING clauses?
5. How do you count the number of records in a table?
6. How do you calculate average, sum, minimum, and maximum values in a column?
7. What is a subquery, and how do you use it?
8. Explain the difference between correlated and non-correlated subqueries.
9. How do you optimize a slow-running query?
10. What are indexes, and how do they improve query performance?
11. How do you insert, update, and delete records in a table?
12. What is the difference between TRUNCATE and DELETE statements?
13. How do you create, alter, and drop a table?
14. What are constraints, and how do you implement them?
15. What is a transaction, and why is it important in SQL?
16. Explain COMMIT, ROLLBACK, and SAVEPOINT.
17. What are window functions, and how do you use them?
18. Explain ROW_NUMBER(), RANK(), and DENSE_RANK().

Today I gave an internal project interview, these are the SQL -questions they asked me.
Find the answers
1.List the emps who are not working in sales department.
2.list emps names,job who are without manager.
3.list the managers whose salary is more than his employees avg salary.
If possible find the answers in pandas, pyspark also..

You might also like