Рет қаралды 5,886
SQL questions recently asked in DBS Bank interview. Find the missing weeks in a table
To find out the expected output, I use Recursive CTE.
--Create table syntax
CREATE TABLE sls_tbl (pid INT, sls_dt DATE, sls_amt INT )
-- Insert data into the table
INSERT INTO sls_tbl (pid, sls_dt, sls_amt)
VALUES (201, '2024-07-11', 140), (201, '2024-07-18', 160), (201, '2024-07-25', 150), (201, '2024-08-01', 180), (201, '2024-08-15', 170), (201, '2024-08-29', 130)
For more SQL interview questions. Check out our playlist.
• SQL Interview Questions
Contact us:
info@cloudchallengers.com
Follow us on
Instagram : cloudchallengers
Facebook : cloudchallengers
LinkedIn : linkedin.com/company/cloudchallengers