Summary
Keywords
Full Transcript
#dataengineer #dataengineering #pyspark #adf #databricks #sql SQL interview question Fill null values with previous value Want more similar videos- hit like, comment, share and subscribe ❤️Do Like, Share and Comment ❤️ ❤️ Like Aim 5000 likes! ❤️ ➖➖➖➖➖➖➖➖➖➖➖➖➖ script CREATE TABLE Chocolate_Brands ( chocolate_name VARCHAR(50), brand_name VARCHAR(50) ); INSERT INTO Chocolate_Brands (chocolate_name, brand_name) VALUES ('KitKat', 'Nestle'), ('Perk', NULL), ('Munch', NULL), ('Dairy Milk', 'Cadbury'), ('5 Star', NULL), ('Silk', NULL); query - with cte as( select * , row_number() over(order by (select null)) rn , case when brand_name is null then 0 else 1 end rn1 from chocolate_brands ) ,cte1 as( select * , sum(rn1) over(order by rn) roll_sum from cte ) select chocolate_name, brand_name , max(brand_name) over(partition by roll_sum) as new_brand_name from cte1 ➖➖➖➖➖➖➖➖➖➖➖➖➖ AWS DATA ENGINEER : https://www.youtube.com/playlist?list=PLOlK8ytA0MghpdMjb0m9zu1v9s_qbRP0q Azure data factory : https://youtube.com/playlist?list=PLOlK8ytA0MgguN5XidtQXbILxwCdJCUJE&si=iEICXHP80zGchUYh Azure data engineer playlist : https://youtube.com/playlist?list=PLOlK8ytA0MghBrzu0i6WlTBdoO1WdwV_e SQL PLAYLIST : https://www.youtube.com/playlist?list=PLOlK8ytA0MggGXIKmbfZ-_Xqcos3JKdV- PYSPARK PLAYLIST - https://www.youtube.com/playlist?list=PLOlK8ytA0MgjvOpd-088NRU_vTYw_aryH ➖➖➖➖➖➖➖➖➖➖➖➖➖ 📣Want to connect with me? Check out these links:📣 Join telegram to discuss https://t.me/+Cb98j1_fnZs3OTA1 ➖➖➖➖➖➖➖➖➖➖➖➖➖ what we have covered in this video: ➖➖➖➖➖➖➖➖➖➖➖➖➖ Hope you liked this video and learned something new :) See you in next video, until then Bye-Bye! ➖➖➖➖➖➖➖➖➖➖➖➖➖
