filmov
tv
SQL Interview Questions and answers Part 21 | SQL Scenario based Interview Question and Answer

Показать описание
SQL Interview Questions and answers Part 21 | Amazon SQL Interview Question And Answer Part-7
This question has been asked in Amazon interview.
Input :- BalanceTbl has two columns namely Balance and Dates.
Problem Statements :- Write SQL to derive Start_Date and End_Date column when there is continuous amount in Balance column as shown below.
Follow me on Social Networking Sites :
*Twitter:
*Instagram :
Scripts :
Create Table BalanceTbl(
Balance int,
Dates Date
)
Insert into BalanceTbl Values(26000,'2020-01-01')
Insert into BalanceTbl Values(26000,'2020-01-02')
Insert into BalanceTbl Values(26000,'2020-01-03')
Insert into BalanceTbl Values(30000,'2020-01-04')
Insert into BalanceTbl Values(30000,'2020-01-05')
Insert into BalanceTbl Values(26000,'2020-01-06')
Insert into BalanceTbl Values(26000,'2020-01-07')
Insert into BalanceTbl Values(32000,'2020-01-08')
Insert into BalanceTbl Values(31000,'2020-01-09')
#AmazonDataEngineer #AmazonInterview #AmazonSQLInterviw #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #sqlInterviewQuestionsForTesting #sqlInterviewQuestionsQuery #sqlInterviewQuestionsOnJoins #ITJunction4All
This question has been asked in Amazon interview.
Input :- BalanceTbl has two columns namely Balance and Dates.
Problem Statements :- Write SQL to derive Start_Date and End_Date column when there is continuous amount in Balance column as shown below.
Follow me on Social Networking Sites :
*Twitter:
*Instagram :
Scripts :
Create Table BalanceTbl(
Balance int,
Dates Date
)
Insert into BalanceTbl Values(26000,'2020-01-01')
Insert into BalanceTbl Values(26000,'2020-01-02')
Insert into BalanceTbl Values(26000,'2020-01-03')
Insert into BalanceTbl Values(30000,'2020-01-04')
Insert into BalanceTbl Values(30000,'2020-01-05')
Insert into BalanceTbl Values(26000,'2020-01-06')
Insert into BalanceTbl Values(26000,'2020-01-07')
Insert into BalanceTbl Values(32000,'2020-01-08')
Insert into BalanceTbl Values(31000,'2020-01-09')
#AmazonDataEngineer #AmazonInterview #AmazonSQLInterviw #SQLInterviewQuestionsandanswers #sqlInterviewQuestions #sqlInterviewQuestionsForTesting #sqlInterviewQuestionsQuery #sqlInterviewQuestionsOnJoins #ITJunction4All
Комментарии