Sequence Puzzle | SQL Scenario interview question (Amazon data engineering interview)

 DROP TABLE IF EXISTS SequenceData;;

CREATE TABLE SequenceData ( Name varchar(10), [Sequence] int ) INSERT INTO SequenceData VALUES ('A',1), ('A',2), ('A',3), ('A',4), ('A',7), ('A',8), ('A',10), ('B',11), ('B',13), ('C',15), ('C',16), ('C',17), ('C',18) SELECT * FROM SequenceData

Detailed Explanation: https://youtu.be/vsA0NjsGiqQ

Comments

Popular posts from this blog

50 Essential SQL Questions to Land Your Dream Job

How to find all the customers who placed orders on three consecutive days | SQL Scenario questions

ACCENTURE SQL INTERVIEW QUESTION | Change the ProductIDs