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

Pubblicato il: 14 agosto 2024
sul canale di: 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


In questa pagina del sito puoi guardare il video online KPMG SQL Interview Question - Using ROW_NUMMBER( ) & CASE Statement della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Cloud Challengers 14 agosto 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 10,382 volte e gli è piaciuto 262 spettatori. Buona visione!