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

Publié le: 14 août 2024
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne KPMG SQL Interview Question - Using ROW_NUMMBER( ) & CASE Statement durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Cloud Challengers 14 août 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 10,382 fois et il a aimé 262 téléspectateurs. Bon visionnage!