KPMG SQL Interview Question - Using ROW_NUMMBER( ) & CASE Statement

Published: 14 August 2024
on channel: Cloud Challengers
10,382
262

SQL questions recently asked in KPMG interview. We need to find running total on the transactions table.
To find out running total we use functions like ROW_NUMBER() and CASE statement.

--Create table syntax
CREATE TABLE transactions_1308 (transaction_id BIGINT, type VARCHAR(50), amount INT,transaction_date DATE)

-- Insert data into the table
INSERT INTO transactions_1308 VALUES (53151, 'deposit', 178, '2022-07-08'), (29776, 'withdrawal', 25, '2022-07-08'),(16461, 'withdrawal', 45, '2022-07-08'),(19153, 'deposit', 65, '2022-07-10'),(77134, 'deposit', 32, '2022-07-10')




For more SQL interview questions. Check out our playlist.
   • SQL Interview Questions  


Contact us:
info@cloudchallengers.com

Follow us on
Instagram : instagram.com/cloudchallengers
Facebook : facebook.com/cloudchallengers
LinkedIn : linkedin.com/company/cloudchallengers


On this page of the site you can watch the video online KPMG SQL Interview Question - Using ROW_NUMMBER( ) & CASE Statement with a duration of hours minute second in good quality, which was uploaded by the user Cloud Challengers 14 August 2024, share the link with friends and acquaintances, this video has already been watched 10,382 times on youtube and it was liked by 262 viewers. Enjoy your viewing!