7 SQL Tricks Most People Never Learn (Make your SQL code better)
techTFQ
I've been working with SQL for over 17 years, and I still come across tricks that surprise me. In this video I share 7 SQL tricks built around things you already do every day, like dropping tables, loading data, deleting rows, and dividing numbers. For each one I show the usual way and the better way of doing the exact same thing.
I built SQLNest with all my SQL and Data Engineering experience. Learn and practice SQL, all in one place:
https://sqlnest.com/
Timestamps
00:00 Intro
01:18 Trick 1: Drop or truncate several tables in one statement
03:36 Trick 2: Add the primary key after loading data
08:05 Trick 3: Archive and delete in one statement
11:39 Trick 4: Copy a table's structure
16:33 Trick 5: Top N without losing ties
18:10 Trick 6: Safe division
20:10 Trick 7: Name your window once
Related videos:
How Much SQL Do You ACTUALLY Need? https://www.youtube.com/watch?v=gq8OUt8hpIA
40 Data Engineering Terms You MUST Know Before Your Interview: https://www.youtube.com/watch?v=aycEYQEHivY
If this helped, like the video and subscribe for more SQL and data engineering content. Tell me in the comments which trick was new to you.
Follow me:
LinkedIn: /thoufiq-mohammed...
I built SQLNest with all my SQL and Data Engineering experience. Learn and practice SQL, all in one place:
https://sqlnest.com/
Timestamps
00:00 Intro
01:18 Trick 1: Drop or truncate several tables in one statement
03:36 Trick 2: Add the primary key after loading data
08:05 Trick 3: Archive and delete in one statement
11:39 Trick 4: Copy a table's structure
16:33 Trick 5: Top N without losing ties
18:10 Trick 6: Safe division
20:10 Trick 7: Name your window once
Related videos:
How Much SQL Do You ACTUALLY Need? https://www.youtube.com/watch?v=gq8OUt8hpIA
40 Data Engineering Terms You MUST Know Before Your Interview: https://www.youtube.com/watch?v=aycEYQEHivY
If this helped, like the video and subscribe for more SQL and data engineering content. Tell me in the comments which trick was new to you.
Follow me:
LinkedIn: /thoufiq-mohammed...
0 Comments
No comments yet. Be the first to weigh in.