String Functions in MySQL | Intermediate MySQL Series

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 44

  • @benny9794
    @benny9794 4 หลายเดือนก่อน +20

    I love when you specify when you actually use which functions at your real world job and when functions are less used. Gives a good idea of what is to come in a job

  • @aalanaa
    @aalanaa หลายเดือนก่อน +11

    string functions are used to manipulate and work with text strings.
    common string functions with real-world uses:
    - CONCAT(): Combines multiple strings into one (e.g., full names).
    - LENGTH(): Returns the length of a string (e.g., checking password length).
    - LOWER()/UPPER(): Converts a string to lowercase or uppercase (e.g., email validation).
    - SUBSTRING(): Extracts part of a string (e.g., area codes).
    - TRIM(): Removes extra spaces (e.g., cleaning user input).
    - REPLACE(): Replaces occurrences of a substring (e.g., updating city names).

  • @SetYourBarTo10
    @SetYourBarTo10 10 หลายเดือนก่อน +34

    Starting the day with a cup of coffee and Alex the Analyst.
    Feeling good about today.

    • @enigmastare
      @enigmastare 4 หลายเดือนก่อน +3

      so did u finish it did u land a job want some update

  • @Adeola_Adegbesan
    @Adeola_Adegbesan 10 หลายเดือนก่อน +5

    Awesome session. I love the functionalities of these strings in data cleaning. Thanks Alex!

  • @HeinHtetAung-s9y
    @HeinHtetAung-s9y 3 หลายเดือนก่อน +4

    Very effective lesson with direct key points. Really appreciate your effort, Alex

  • @kuanweili6190
    @kuanweili6190 10 หลายเดือนก่อน +3

    Thank you Alex. Just wanted to drop a quick note to say how much i loved your video

  • @YoanBello-r7v
    @YoanBello-r7v 10 หลายเดือนก่อน +12

    Sorry one question, why in your roadmap abou data analyst you dont talk about Statistics skills. Thanks

    • @devaneshs.m.4301
      @devaneshs.m.4301 2 หลายเดือนก่อน

      Also did we have to learn both power bi and tableau

  • @habibullah7425
    @habibullah7425 5 หลายเดือนก่อน

    You are a great teacher, Alex. Wish you all the best.

  • @Bjellica
    @Bjellica 10 หลายเดือนก่อน +1

    Hi, Alex. Appreciate all you work here. Could you make a video regarding procedures and some use cases?

  • @abdeSaves
    @abdeSaves หลายเดือนก่อน

    **Summary:**
    - `length(str)`: (int) Length of `str`.
    - `upper(str)`: (str) `str` converted to uppercase.
    - `lower(str)`: (str) `str` converted to lowercase.
    - `trim(str)`: (str) `str` trimmed from both ends.
    - `rtrim(str)`: (str) `str` trimmed from the right.
    - `ltrim(str)`: (str) `str` trimmed from the left.
    - `left(str, n)`: (str) The first `n` characters of `str`.
    - `right(str, n)`: (str) The last `n` characters of `str.
    - `substring(str, n, m)` (also `substr()`): (str) An `m`-long substring starting at the `n`-th character of `str`.
    - `replace(str, sub1, sub2)`: (str) `str` with all instances of `sub1` replaced with `sub2`.
    - `locate(sub, str)`: (int) Position of `sub` in `str` (1-based index).
    - `concat(str1, str2, ...)`: (str) Concatenation of `str1` and `str2`.
    ------------------------------------
    **Bonus:**
    - `instr(str, sub)`: (int) Position of `sub` in `str` (1-based index).
    ----------------------------------------
    Please let me know if there is anything wrong. Thanks!

  • @igwejoseph3145
    @igwejoseph3145 หลายเดือนก่อน +4

    Hi i know its been long, i really hope i get a response, i have been following up to this point.
    8:57 of this video, REPLACE String function, you used 'A' to be replaced with 'Z', but the name "Ann", the 'A' wasn't replaced. why?

    • @amanranjan9171
      @amanranjan9171 28 วันที่ผ่านมา +3

      Bro because he used lowercase letter 'a'
      If you want to replace Ann
      you have toh use 'A' upper case letter

    • @igwejoseph3145
      @igwejoseph3145 28 วันที่ผ่านมา

      Thank you so much ❤​@@amanranjan9171

  • @christinas319
    @christinas319 10 หลายเดือนก่อน +1

    Very informative thanks Alex

  • @BruceBeck-f1n
    @BruceBeck-f1n 6 หลายเดือนก่อน +1

    Hmmm... Wonder how I managed to get my comment about the UNION lesson in the String Functions lesson???? Guess I should have been paying more attention to detail...! That said, this lesson on String Functions of succinct and clear. Everything works as advertised and it all makes sense. Nice job Alex!

  • @bankrow
    @bankrow 5 หลายเดือนก่อน +4

    9:17 with the "REPLACE" is there any way to recognize both lower and uppercase?

    • @vladlenshatunov7961
      @vladlenshatunov7961 3 หลายเดือนก่อน +2

      you could use a double replace to do that, like this:
      select first_name, replace(replace(first_name, 'a','z'), 'A', 'Z' ) as
      modified_name
      from employee_demographics
      ;
      think about it as you have your first replace based on first_name, then on the outer replace it takes the inner replace word which is only for lowercase a's and in those words it starts replacing the uppercase letter

  • @alig5093
    @alig5093 10 หลายเดือนก่อน +2

    Hi Alex, I want to start learning Data analysis and the laptop I chose to buy has a i5 13420h cpu (16gb ram, 1tb ssd) What do you think about the cpu? is it good enough for me to get started?

  • @ashokdamodaran2317
    @ashokdamodaran2317 10 หลายเดือนก่อน +1

    Hi Alex, i am having 10 years of experience as a Quality analyst in banking,can you please help me to suggest if self-study or doing a master's is a good option

  • @BruceBeck-f1n
    @BruceBeck-f1n 6 หลายเดือนก่อน +3

    Well, that was fun! Ending my day with Alex the Analyst while my lovely Bride is preparing dinner (I'm one lucky 'Wanna-Be-Data-Nerd'). Somehow UNION just makes more sense than JOINS for me. I just need more exposure and practice - like this Intermediate MySQL Series for example. Thanks again Alex! 😎

  • @ivanko-nebo
    @ivanko-nebo 10 หลายเดือนก่อน +1

    Am I getting it right that in order to extract the month from the date using SUBSRTING the date should be in a string format, not a date?

    • @mdfuadhasancanada
      @mdfuadhasancanada 3 หลายเดือนก่อน

      Yes, Substring doesn't work for Int datatype. You have to cast the type.
      for example: SUBSTRING(Cast(birth_date AS varchar(8)), 6,2)

    • @miamdzobran
      @miamdzobran 3 หลายเดือนก่อน

      @@mdfuadhasancanada bro, I wish I could come here earlier. I searched for similar solution online multiple times but could not figure it out. thanks for sharing the solution.

    • @mdfuadhasancanada
      @mdfuadhasancanada 3 หลายเดือนก่อน

      @@miamdzobran Anytime bud!

  • @moni2526
    @moni2526 10 หลายเดือนก่อน

    Great stuff 😊✌️

  • @mkznan5963
    @mkznan5963 หลายเดือนก่อน +1

    What order by 2 means?

    • @veetoria-toms
      @veetoria-toms 9 วันที่ผ่านมา

      Please reply to this if you know what it means now, thanks

  • @MD-mo9wb
    @MD-mo9wb 3 หลายเดือนก่อน +2

    My 'Select' and 'From' are always lower case. Anyone else?

    • @NohablaEspnaol
      @NohablaEspnaol 2 หลายเดือนก่อน +1

      No issues as long as it doesn't give you a problem lol, as someone said, don't fix it if its not broken, but on other platforms, writing it in capitals help the most as much as I know

    • @MD-mo9wb
      @MD-mo9wb 2 หลายเดือนก่อน

      @@NohablaEspnaol heard

  • @LogarPassport
    @LogarPassport 5 หลายเดือนก่อน

    Thank you Sir❤

  • @rahalvithanage3295
    @rahalvithanage3295 4 หลายเดือนก่อน

    Is there a way to make the first letter of all names UPPER and the rest LOWER?

    • @Bramhani124
      @Bramhani124 3 หลายเดือนก่อน +3

      use substring for first letter with upper and for remaining letters ,use substring with lower and then concat both.
      for example:Name :ALEX
      select name,
      concat(
      (upper(substring(name,1,1)),
      (lower(substring,(name,2,length(name)-1) ) #lower(substring(name,2)) you can also use this
      ) as new_name
      from table1;

  • @MinatoJunior-hl8tb
    @MinatoJunior-hl8tb 10 หลายเดือนก่อน

    Can you show in mysql how to download csv files faster

  • @veetoria-toms
    @veetoria-toms 9 วันที่ผ่านมา

    Hi everyone,
    I keep getting '10' as the length of the first name.
    What could i be doing wrong?

    • @bourne5221
      @bourne5221 8 วันที่ผ่านมา

      I'm guessing you have quotes around first_name, so it's interpreting it as a string, not a column.

  • @wherezavigoes
    @wherezavigoes 6 หลายเดือนก่อน

    Hello how can I download this data??

    • @hannood5330
      @hannood5330 4 หลายเดือนก่อน +2

      Through the github link in the description of the first video of him teaching sql.

  • @haastrupadebayoibukun6817
    @haastrupadebayoibukun6817 5 หลายเดือนก่อน

    Interesting

  • @mrbartuss1
    @mrbartuss1 10 หลายเดือนก่อน

    Is it really intermediate?

  • @ifeomajames8702
    @ifeomajames8702 7 หลายเดือนก่อน +2

    You and semicolons 😂