# S&P Global Interview Questions with Answers

8 previously-asked interview questions from S&P Global's hiring process, each with the correct answer and a worked explanation. Written against the company's actual test pattern.

_Source: Astra (https://useastra.in). Updated 2026-09-05._

### 1. What is a window function in SQL?

**Answer:** A window function performs a calculation across a set of rows related to the current row without collapsing them, using the OVER clause with optional PARTITION BY and ORDER BY. Examples include ROW_NUMBER, RANK, and running totals with SUM OVER.

**Explanation:** Computes across related rows via OVER, without grouping them away.

### 2. What is the difference between a clustered and a non-clustered index?

**Answer:** A clustered index determines the physical order of rows in the table, so there is only one per table and lookups are fast. A non-clustered index is a separate structure with pointers to rows, and a table can have several. Clustered suits range queries on the key.

**Explanation:** Clustered orders the rows (one per table); non-clustered is a separate lookup structure.

### 3. What is a subquery in SQL?

**Answer:** A subquery is a query nested inside another query, used in SELECT, FROM, or WHERE clauses to provide intermediate results. It can be correlated (referring to the outer query) or non-correlated (independent).

**Explanation:** A query nested inside another query.

### 4. How would you find the second highest salary in an employees table using SQL?

**Answer:** One way: SELECT MAX(salary) FROM employees WHERE salary less than (SELECT MAX(salary) FROM employees). Alternatively use DENSE_RANK over salary and filter for rank 2, which handles ties cleanly.

**Explanation:** Max below the max, or DENSE_RANK filtered to 2.

### 5. What are the time complexities of quicksort, merge sort, and bubble sort?

**Answer:** Quicksort averages O(n log n) but is O(n^2) in the worst case. Merge sort is O(n log n) in all cases but needs O(n) extra space. Bubble sort is O(n^2). Merge sort is stable; quicksort is usually faster in practice.

**Explanation:** Quicksort avg n log n (worst n^2), merge sort n log n, bubble n^2.

### 6. What is the difference between structured and unstructured data?

**Answer:** Structured data fits a fixed schema of rows and columns and lives in relational databases (for example transactions). Unstructured data has no predefined model, such as text, images, and logs, and is stored in files or NoSQL or data lakes. Semi-structured data like JSON sits in between.

**Explanation:** Structured fits a schema; unstructured has no fixed model.

### 7. Tell me about yourself.

**Answer:** Give a concise 60 to 90 second overview: your degree, technical and analytical skills, a data or software project with its impact, and why S&P Global interests you. Keep it structured and relevant.

**Explanation:** Structured pitch: background, skills, project, fit.

### 8. Why do you want to join S&P Global?

**Answer:** Mention S&P Global role in financial data, ratings, and analytics, its impact on global markets, the chance to work with large datasets and technology, and strong learning opportunities. Tie it to your interest in data and finance.

**Explanation:** Financial data and analytics at scale; data-driven work.

More S&P Global preparation, including the full recruitment process: https://useastra.in/campus/s-and-p-global
