78 Advanced SQL questions from the Data Engineering bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
B.The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
C.Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
D.SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
Answer + AI explanation with Pro
2. Which command will Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.?
Mid
A.window frame
B.FILTER
C.NULLIF
D.LATERAL
Answer + AI explanation with Pro
3. Which statement is correct?
Mid
A.LATERAL — Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
B.LATERAL — Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
C.LATERAL — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
D.LATERAL — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
Answer + AI explanation with Pro
4. What does CROSS JOIN LATERAL do?
Mid
A.Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
B.Snowflake table function that explodes a VARIANT, ARRAY, or OBJECT into rows, the semi-structured-data equivalent of unnesting.
C.Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
D.Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
Answer + AI explanation with Pro
5. Which command will Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.?
Mid
A.RECURSIVE CTE
B.NULLIF
C.CROSS JOIN LATERAL
D.PIVOT
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.CROSS JOIN LATERAL — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
B.CROSS JOIN LATERAL — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
C.CROSS JOIN LATERAL — Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
D.CROSS JOIN LATERAL — Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
Answer + AI explanation with Pro
7. What does UNNEST do?
Mid
A.Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
B.Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
C.Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
D.Snowflake table function that explodes a VARIANT, ARRAY, or OBJECT into rows, the semi-structured-data equivalent of unnesting.
Answer + AI explanation with Pro
8. Which command will Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.?
Mid
A.NULLIF
B.FILTER
C.PIVOT
D.UNNEST
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.UNNEST — Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
B.UNNEST — Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
C.UNNEST — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
D.UNNEST — Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
Answer + AI explanation with Pro
10. What does FLATTEN do?
Mid
A.Snowflake table function that explodes a VARIANT, ARRAY, or OBJECT into rows, the semi-structured-data equivalent of unnesting.
B.A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
C.Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
D.Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
Answer + AI explanation with Pro
11. Which command will Snowflake table function that explodes a VARIANT, ARRAY, or OBJECT into rows, the semi-structured-data equivalent of unnesting.?
Mid
A.UNNEST
B.FILTER
C.FLATTEN
D.RECURSIVE CTE
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.FLATTEN — Snowflake table function that explodes a VARIANT, ARRAY, or OBJECT into rows, the semi-structured-data equivalent of unnesting.
B.FLATTEN — Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
C.FLATTEN — Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
D.FLATTEN — Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
Answer + AI explanation with Pro
13. What does MATCH_RECOGNIZE do?
Senior
A.Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
B.SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
C.Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
D.Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
Answer + AI explanation with Pro
14. Which command will SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.?
Senior
A.CROSS JOIN LATERAL
B.FLATTEN
C.MATCH_RECOGNIZE
D.UNNEST
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.MATCH_RECOGNIZE — Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
B.MATCH_RECOGNIZE — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
C.MATCH_RECOGNIZE — Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
D.MATCH_RECOGNIZE — Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
Answer + AI explanation with Pro
16. What does PIVOT do?
Mid
A.Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
B.Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
C.Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
D.Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
Answer + AI explanation with Pro
17. Which command will Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.?
Mid
A.CROSS JOIN LATERAL
B.LATERAL
C.PIVOT
D.RECURSIVE CTE
Answer + AI explanation with Pro
18. Which statement is correct?
Mid
A.PIVOT — A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
B.PIVOT — Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
C.PIVOT — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
D.PIVOT — Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
Answer + AI explanation with Pro
19. What does UNPIVOT do?
Mid
A.Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
B.Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
C.Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
D.Function returning null when its two arguments are equal, commonly used to guard against divide-by-zero by nulling a zero denominator.
Answer + AI explanation with Pro
20. Which command will Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.?
Mid
A.CROSS JOIN LATERAL
B.UNPIVOT
C.window frame
D.MATCH_RECOGNIZE
Answer + AI explanation with Pro
21. Which statement is correct?
Mid
A.UNPIVOT — Operator that rotates columns back into rows, converting a wide cross-tab into long key-value format.
B.UNPIVOT — Function returning null when its two arguments are equal, commonly used to guard against divide-by-zero by nulling a zero denominator.
C.UNPIVOT — A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
D.UNPIVOT — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
Answer + AI explanation with Pro
22. What does RECURSIVE CTE do?
Senior
A.SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
B.A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
C.Function returning null when its two arguments are equal, commonly used to guard against divide-by-zero by nulling a zero denominator.
D.Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
Answer + AI explanation with Pro
23. Which command will A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.?
Senior
A.UNPIVOT
B.NULLIF
C.RECURSIVE CTE
D.PIVOT
Answer + AI explanation with Pro
24. Which statement is correct?
Senior
A.RECURSIVE CTE — A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
B.RECURSIVE CTE — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
C.RECURSIVE CTE — Function returning null when its two arguments are equal, commonly used to guard against divide-by-zero by nulling a zero denominator.
D.RECURSIVE CTE — Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
Answer + AI explanation with Pro
25. What does FILTER do?
Mid
A.Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
B.Join that pairs each left row with rows produced by a lateral subquery depending on that row, often used to expand arrays or call table functions per row.
C.A WITH RECURSIVE common table expression that references itself to traverse hierarchies or graphs, such as org charts or bill-of-materials trees.
D.Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
Answer + AI explanation with Pro
26. Which command will Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.?
Mid
A.PIVOT
B.FLATTEN
C.FILTER
D.RECURSIVE CTE
Answer + AI explanation with Pro
27. Which statement is correct?
Mid
A.FILTER — Operator that rotates distinct values of a column into separate columns, turning long-format rows into a wide cross-tab.
B.FILTER — Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
C.FILTER — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
D.FILTER — Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
Answer + AI explanation with Pro
28. What does window frame do?
Senior
A.Join keyword allowing a subquery on the right side to reference columns from tables on its left, enabling row-by-row correlated joins.
B.Aggregate clause (FILTER (WHERE ...)) applying a per-aggregate condition, a cleaner alternative to CASE expressions inside aggregates.
C.The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
D.Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
Answer + AI explanation with Pro
29. Which command will The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.?
Senior
A.UNPIVOT
B.RECURSIVE CTE
C.LATERAL
D.window frame
Answer + AI explanation with Pro
30. Which statement is correct?
Senior
A.window frame — The ROWS or RANGE specification defining which rows around the current row a window aggregate sees; RANGE is value-based while ROWS is positional.
B.window frame — SQL clause for row-pattern recognition that matches sequences of rows against a regular-expression-like pattern over an ordered partition, used for sessionization and funnels.
C.window frame — Function returning the first non-null argument from a list, used to supply defaults and combine fallback columns.
D.window frame — Operator that flattens an array or repeated column into one row per element, the standard way to explode nested data in BigQuery and Snowflake.
Answer + AI explanation with Pro
Showing 30 of 78 Advanced SQL questions — the full set, with answers, explanations and an AI tutor on every question, is inside.
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Advanced SQL question come with Pro.