SQL + Data/ETL
Up to window functions + CTEs; SQL-as-test-oracle. A hard MUST (~35/50 JDs), not a quiet filter; ETL reconciliation is a MUST for Tekion/Cognizant. STOP before query tuning, DBA ops, pipeline authoring.
- NULL semantics (NOT IN trap, COALESCE)
Understand three-valued logic and NULL gotchas that break tests.
'Why does WHERE col = NULL return no rows?' / 'why did my NOT IN query break?'
- SELECT / WHERE with all operators
Write a filtered read against a table live, using the full operator set.
'Fetch all orders placed in the last 30 days over 500 that are not cancelled' — write it live.
- ORDER BY, LIMIT/TOP/OFFSET, DISTINCT
Sort, cap, and dedupe result sets live.
'Return the 10 most recent signups, newest first' / 'list the unique payment methods used'.
- INNER JOIN
Combine two related tables on a key and return only matched rows.
'Get every order with its customer name' — the single most common SQL topic.
- LEFT / RIGHT JOIN + IS NULL orphan finder
Use an outer join anti-pattern to surface unmatched/orphan rows — the classic integrity check.
'Find orders that have no matching customer' / 'find customers who never placed an order'.
- GROUP BY + COUNT/SUM/AVG/MIN/MAX
Aggregate rows into per-group summaries live.
'Average salary per department' / 'order count per customer'.
- HAVING vs WHERE
Filter aggregated groups (HAVING) vs individual rows (WHERE) and know the order.
'What's the difference between WHERE and HAVING?' + 'keep only groups with count > 1'.
- Subqueries: scalar / IN / EXISTS
Nest a query inside another as a value, a set filter, or an existence test.
'Employees earning above the company average' / 'customers who have at least one order'.
- Find duplicates (GROUP BY ... HAVING COUNT>1)
Detect duplicate keys/rows — a canonical data-quality query.
'Find duplicate emails / duplicate records in a table.'
- 2nd / Nth highest value (3 ways)
Return the Nth-ranked value via subquery, window, and LIMIT/OFFSET; handle ties.
'Find the 2nd highest salary — now give me two more approaches, and handle duplicate salaries.'
- Self-join
Join a table to itself to relate rows within one table.
'List each employee with their manager's name from one employees table.'
- FULL OUTER JOIN
Return matched rows plus unmatched from both sides — the diffing join.
'Compare two tables and show rows missing on either side' (source-vs-target diff).
- Correlated subquery
A subquery that references the outer row, re-evaluated per row.
'Employees earning above their own department's average salary.'
- Keys & constraints: PK / FK / UNIQUE / NOT NULL / CHECK
Know the constraint types because DB testing = verifying they hold.
'Difference between primary key and unique key?' / 'how would you test that a foreign key is enforced?'
- DDL vs DML vs DCL; TRUNCATE vs DELETE vs DROP
Classify statements and know the delete-family differences — a common concept check.
'TRUNCATE vs DELETE vs DROP?' / 'is TRUNCATE DDL or DML?'
- INSERT (VALUES + SELECT)
Seed test data by literal rows or by copying from a query.
'How do you set up the data your automated test needs?' / practical seeding task.
- UPDATE ... WHERE
Mutate specific rows to reach a test state — always scoped by WHERE.
'Move a test order into 'refunded' state so you can test the refund flow.'
- DELETE ... WHERE
Remove specific rows for teardown/clean state, scoped by WHERE.
'How do you clean up data your test created?'
- Transactions: BEGIN / COMMIT / ROLLBACK
Group statements atomically so tests can roll back and never corrupt shared DBs.
'How do you keep your DB tests from polluting the shared test database?'
- UPDATE / DELETE via JOIN or subquery
Mutate rows selected by another table/query — incl. de-dup delete.
'Delete duplicate rows but keep one' — a very common follow-up to the find-duplicates question.
- Stored procedures / views (read + call)
Read what a proc/view does and invoke it; NOT author production procs.
'How would you test a stored procedure?' / 'have you validated data through stored procedures?'
- Window functions: ROW_NUMBER / RANK / DENSE_RANK + PARTITION BY
Rank/number rows within partitions without collapsing them — the intermediate ceiling.
'Top-paid employee per department' / 'rank vs dense_rank difference' / 'top-N per group with a join'.
- CTE (WITH ...)
Name intermediate result sets for readable multi-step queries.
'Rewrite this nested query using a CTE' / any multi-step query where clean structure is judged.
- CASE WHEN + conditional aggregation
Inline conditional logic; pivot counts via SUM(CASE WHEN ...).
'Count paid vs failed orders in a single query' / bucket values into categories.
- Set operators: UNION / UNION ALL / INTERSECT / EXCEPT(MINUS)
Combine/diff two result sets — the direct tool for source-vs-target reconciliation.
'UNION vs UNION ALL?' / 'find rows present in source but missing in target.'
- Index awareness (conceptual)
Know what an index is and why a query is slow — talk-level only, no tuning.
'Why might this query be slow?' — a light conceptual probe.
- LAG / LEAD
Access a previous/next row's value for row-to-row comparisons.
'Compare each day's value to the previous day' / 'find gaps in a sequence.'
- SQL as a test oracle (verify API/UI write in DB)
After an API/UI action, query the DB to assert the backend persisted correctly — the core SDET SQL use.
'Your API test creates an order — how do you confirm it in the database?'
- NoSQL awareness (MongoDB / MySQL / NoSQL query basics)
Recognize document vs relational stores and do basic MongoDB find queries; know MySQL dialect quirks.
'We use MongoDB — how would you validate a document was written?' / dialect follow-ups.
- Multi-tenant / RLS DB-layer isolation testing
Verify one tenant's queries cannot read another tenant's rows at the DB layer.
'How would you test that tenant data is isolated at the database layer / that RLS policies work?'
- Warehouse / big-data tooling awareness (BigQuery, Snowflake, Spark, Airflow, Databricks, dbt, Great Expectations)
Name-level awareness of warehouse dialects and data-QA tooling so you don't freeze when a JD names them.
'Have you worked with BigQuery / Airflow / dbt / Great Expectations?' — recognition + honest framing.
- Data lineage / consistency across systems
Trace a data element across source -> pipeline -> target -> report and assert consistency at each hop.
'A number in the dashboard is wrong — how do you trace where the data broke?'
- Schema / metadata validation
Verify column names, types, lengths, and constraints match the mapping/contract.
'How do you validate the target table's schema matches the contract?'
- The ETL test flow (recite)
Narrate the standard end-to-end ETL testing process on demand.
'Walk me through your ETL testing process end to end.'
- Field-level data comparison (EXCEPT / full-outer diff)
Compare values field-by-field between source and target for the same key.
'Counts match but is the data correct? How do you compare field values source vs target?'
- Transformation-rule validation
Verify business/transformation rules were applied correctly during load.
'How do you test that the transformation logic in the pipeline is correct?'
- Data-quality checks: completeness / uniqueness / validity / freshness
Assert the data-quality dimensions with SQL and (for data shops) automated monitoring.
'What data-quality dimensions do you check and how?' / 'how do you detect a stale or anomalous data load?'
- Source-to-target count reconciliation
Confirm row counts match between source and target after a load; report the delta.
'How do you validate that an ETL load moved all the records?'
- Python + SQL data-validation harness (artifact)
A Pytest suite using sqlalchemy/psycopg2 that sets up data, acts, asserts DB state, and reconciles source-vs-target.
'Show/describe how you'd automate database and data-pipeline validation in a framework.'
- Query optimizer internals / index B-tree tuning / execution-plan cost tuning
DBA/performance-engineering depth that does not gate an SDET-2 hire.
Not asked for this role (DBA / data-engineer territory).
- Authoring production stored procs / triggers / functions
Writing/maintaining production procedural DB code from scratch.
Not asked for SDET-2 (developer/DBA task).
- DBA ops, data modeling / normalization design, building pipelines (Airflow DAGs / Spark jobs)
Backup/restore/HA, 3NF/dimensional design, and authoring pipelines as a developer.
Not asked for SDET-2.
- Advanced analytics SQL: recursive CTEs, PIVOT/UNPIVOT, JSON/XML shredding, GROUPING SETS/CUBE/ROLLUP
Exotic analytical SQL that almost never gates an SDET hire.
Rarely/never for SDET-2.