Big SQL Energy Beginner Course: Lesson 6 String Manipulation
Got BDE?⚡️
Hi BDEs! Welcome to Lesson 6 of the free Big SQL Energy Beginner Course⚡️ Today we’re learning about string manipulation in SQL!
Return to Big SQL Energy Beginner homepage here to access the other lessons:
If you’re new here:
💁🏽♀️ Who Am I?
I’m Jess Ramos, the founder of Big Data Energy and the creator of the BEST SQL course and community: Big SQL Energy⚡️. Check me out on socials: 🔗LinkedIn, 🔗Instagram, 🔗YouTube, and 🔗TikTok. And of course subscribe to my 🔗newsletter here for all my upcoming lessons and updates— all for free!
⚡️ What is Big SQL Energy?
🔗Big SQL Energy Intermediate is an intermediate SQL course designed to solve real-world business problems hands-on using realistic data and a modern tech stack. You’ll walk away with 2 SQL portfolio projects, portfolio building guidance, access to the Big Data Energy Discord community, and lots of confidence for you upcoming coding interviews! You also get access to all monthly events including masterclasses, office hours, and guest speakers. This course is all of the most important things I’ve learned on the job as a Senior Data Analyst in tech who grew from a $72K salary to over a $150K salary. And now I’m sharing it with YOU! It’s more than just another course— it’s a challenging program designed to upskill your SQL to the intermediate level, get ready to ace your live coding interviews, and build connections in the data community through the Discord and events.
Lesson 6: String Manipulation
Ah… one of the most frustrating part of working with data: STRINGS. String data can be notoriously difficult and annoying to work with because it can be a pain to get strings in the correct format you want. Not only that, but string data can have a lot of variation and mistakes which can be hard to account for as well.
There are SO many functions you can use to modify and manipulate strings— honestly too many to learn and remember! So for real, don’t worry at all if you don’t know what they ALL do and they feel overwhelming. You can easily Google or ChatGPT the syntax as you have different goals and use cases come up. However, I’m going to show you some of the most common string functions because these are worth practicing with!
len(): tells you the length of a string in characters
select
len(customer_first_name) as name_length
from
orders
concat(): concatenates strings
select
customer_first_name,
customer_last_name,
concat(customer_first_name, customer_last_name) as full name
from
orders
replace(): replaces a substring in a string with a different string value
select
customer_first_name,
replace(customer_first_name, 'a', 'BLAH') as funny_test
from
orders
ltrim() and others: trims a string value from the left side of a string
select
order_id,
ltrim(order_id, 'A') as clean_id
from
orders
String functions are really useful when it comes to data cleaning and dealing with messy text data, so definitely get comfortable working with them. But I promise you don’t need to learn or memorize them ALL to be a good data analyst. Learn how to assess what you need to do, research a solution (hello Google & ChatGPT!), and implement those learnings into your scenario. THAT is what will make you a good data analyst— not remembering EVERYTHING off the top of your head.
If you’ve enjoyed the free BEGINNER Big SQL Energy course, grab my intermediate course. There are no deadlines or timelines for this course— you start and take as long as you want. It will take your beginner skills to the next level and get you ready to ace your interviews. DM me or email me at courses@bdeanalytics.com if you have questions on the intermediate course!
Return to Big SQL Energy Beginner homepage here to access the other lessons: