ch
Feedback

不要被骗子欺骗!Telemetrio 会找到并标记这些频道 👉 如果想查看标记,请订阅

SQL Interview Questions

SQL Interview Questions

前往频道在 Telegram

Channel for SQL learning: @sql_res Chennal for SQL syntax: @sql_syntax Chennal for SQL interview questions: @etl_sql_interview

显示更多
未指定国家未指定类别
2 405
订阅者
无数据24 小时
-27 天
-1730 天
帖子存档
1. Answer : A. It transforms the stored column values for every row before comparing them, preventing the query engine from navigating the pre-sorted B-Tree index structure using an index seek. Reason: A condition is SARGable (Search Argument Able) only when the database engine can utilize an index seek directly on the raw column values stored in the B-Tree. Wrapping the column in a function alters its representation dynamically per row, necessitating a full index or table scan to compute the function value for each entry.

Sql Interview question: 1. Why does applying a function like YEAR(order_date) on an indexed column inside a WHERE clause typically lead to a non-SARGable condition and a full table scan? A. It transforms the stored column values for every row before comparing them, preventing the query engine from navigating the pre-sorted B-Tree index structure using an index seek. B. It violates strict ACID normalization rules, causing the transaction log to lock the entire table instead of row-level locking. C. It converts the data type from integer to varchar, triggering a catastrophic implicit conversion error that halts query execution. D. It disables multi-threading capabilities, forcing the query optimizer to process records on a single CPU core sequentially.

https://t.me/AI_Agents_RAG_Learn/28 9 wonderful lectures for learning from Transformers to Agentic systems. 7th Lecture: Agentic LLMs 8th Lecture: LLM Evaluation, where most production teams need deep understanding.

Let's learn how to build Production graded Agentic AI in most effective way, roadmap, courses, links https://t.me/AI_Agents_RAG_Learn

SQL interview queries - BIG 4 https://youtu.be/dWHSt0BVlv0

Tricky SQL interview questions https://youtu.be/aE623ff7zkM

Commonly asked questions - Difference between concepts which looks similar but they aren't ( eg: where vs having, Exists vs In.. etc ) Part 1 : https://youtu.be/RZc4QSRRk98 Part 2 : https://youtu.be/s1QkS4PfiFg

Top 10 SQL interview queries for experienced https://youtu.be/zvuWEysWoLE

Top 25 SQL interview Questions and Answers https://youtu.be/AK7_m-aThfw

MySQL Commands: Full List With Examples https://www.interviewbit.com/blog/mysql-commands/?amp=1

Top 25 SQL interview Questions https://youtu.be/AK7_m-aThfw

To Refer three tables for writing queries👇 https://t.me/etl_sql_interview/8 To Refer questions for writing queries👇 https://t.me/etl_sql_interview/43 Answers : 41. SELECT DEPARTMENT, COUNT(DEPARTMENT) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT; 42. Select * from Worker where WORKER_ID = (SELECT max(WORKER_ID) from Worker); 43. Select * from Worker where WORKER_ID = (SELECT min(WORKER_ID) from Worker); 44. SELECT * FROM Worker WHERE WORKER_ID <=5 UNION SELECT * FROM (SELECT * FROM Worker W order by W.WORKER_ID DESC) AS W1 WHERE W1.WORKER_ID <=5; 45. SELECT t.DEPARTMENT,t.FIRST_NAME,t.Salary from(SELECT max(Salary) as TotalSalary,DEPARTMENT from Worker group by DEPARTMENT) as TempNew Inner Join Worker t on TempNew.DEPARTMENT=t.DEPARTMENT and TempNew.TotalSalary=t.Salary;

Click below link to Refer three tables here for writing queries 👇 https://t.me/etl_sql_interview/8 Q-41. Write an SQL query to show all departments along with the number of people in there. Q-42. Write an SQL query to show the last record from a table. Q-43. Write an SQL query to fetch the first row of a table. Q-44. Write an SQL query to fetch the last five records from a table. Q-45. Write an SQL query to print the name of employees having the highest salary in each department.

To Refer three tables for writing queries👇 https://t.me/etl_sql_interview/8 To Refer questions for writing queries👇 https://t.me/etl_sql_interview/41 Answers : 36. Select max(Salary) from Worker where Salary not in (Select max(Salary) from Worker); 37. select FIRST_NAME, DEPARTMENT from worker W where W.DEPARTMENT='HR' union all select FIRST_NAME, DEPARTMENT from Worker W1 where W1.DEPARTMENT='HR'; 38. (SELECT * FROM Worker) INTERSECT (SELECT * FROM WorkerClone); 39.SELECT * FROM WORKER WHERE WORKER_ID <= (SELECT count(WORKER_ID)/2 from Worker); 40. SELECT DEPARTMENT, COUNT(WORKER_ID) as 'Number of Workers' FROM Worker GROUP BY DEPARTMENT HAVING COUNT(WORKER_ID) < 5;

Click below link to Refer three tables here for writing queries 👇 https://t.me/etl_sql_interview/8 Q-36. Write an SQL query to show the second highest salary from a table. Q-37. Write an SQL query to show one row twice in results from a table. Q-38. Write an SQL query to fetch intersecting records of two tables. Q-39. Write an SQL query to fetch the first 50% records from a table. Q-40. Write an SQL query to fetch the departments that have less than five people in it.

Most commonly asked SQL interview questions https://youtu.be/L-URbfgxBMQ