21 real Advanced Querying questions from the SQL bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is CASE expression?
Junior
A.a GROUP BY extension producing subtotals for every possible combination of the listed grouping columns
B.a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row
C.the technique of turning distinct row values into columns to produce a cross-tabulated summary
D.a construct that returns different values based on evaluated conditions, providing if-then-else logic inside a query
A.CASE expression — a GROUP BY extension letting you specify exactly which combinations of grouping columns to aggregate in one pass
B.CASE expression — a construct that returns different values based on evaluated conditions, providing if-then-else logic inside a query
C.CASE expression — a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET
D.CASE expression — a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row
A.CUBE — a GROUP BY extension letting you specify exactly which combinations of grouping columns to aggregate in one pass
B.CUBE — a GROUP BY extension generating hierarchical subtotal rows plus a grand total along the listed dimensions
C.CUBE — a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET
D.CUBE — a GROUP BY extension producing subtotals for every possible combination of the listed grouping columns
A.GROUPING SETS — a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row
B.GROUPING SETS — a GROUP BY extension letting you specify exactly which combinations of grouping columns to aggregate in one pass
C.GROUPING SETS — a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET
D.GROUPING SETS — a GROUP BY extension generating hierarchical subtotal rows plus a grand total along the listed dimensions
A.PIVOT — a construct that returns different values based on evaluated conditions, providing if-then-else logic inside a query
B.PIVOT — a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET
C.PIVOT — a GROUP BY extension letting you specify exactly which combinations of grouping columns to aggregate in one pass
D.PIVOT — the technique of turning distinct row values into columns to produce a cross-tabulated summary
17. Which term means: "a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row"?
A.LATERAL join — a construct that returns different values based on evaluated conditions, providing if-then-else logic inside a query
B.LATERAL join — a GROUP BY extension generating hierarchical subtotal rows plus a grand total along the listed dimensions
C.LATERAL join — a GROUP BY extension letting you specify exactly which combinations of grouping columns to aggregate in one pass
D.LATERAL join — a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row
20. Which term means: "a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET"?
A.keyset pagination — a join form (called CROSS APPLY in SQL Server) letting a subquery on the right reference columns from the table on the left for each row
B.keyset pagination — the technique of turning distinct row values into columns to produce a cross-tabulated summary
C.keyset pagination — a paging technique that fetches the next page by filtering on the last seen sort key, avoiding the growing cost of skipping rows with a large OFFSET
D.keyset pagination — a construct that returns different values based on evaluated conditions, providing if-then-else logic inside a query
Answers, AI explanations, and a scored voice mock interview
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.