String and Date–Time Functions

In the video below, you will learn all about string functions. They are used for manipulating string data and make it more understandable for analysis. For example, given two strings ‘robertdowneyjr’ and ‘Robert Downey Jr.’, which one is more readable? Of course, the latter one.

Similar to string functions, SQL also has functions to manipulate the date and time values in a database. These are quite useful for analysing time-series data. For example, consider a database pertaining to the students of the university from which you graduated. Now, suppose you have data on the total number of students who used the library every day. You can use date functions to determine whether the library was busier on any particular day of the week as compared with the other days, or maybe a particular month (for example, exam time). In the next video, Professor Ramanathan will take you through queries using such functions.

As you must have realised, functions are extremely important in SQL. They help us extract appropriate information from a single value or a group of values, and even present the information in a better format. Data in a more readable format can make the work of an analyst much easier in the long run.

Now, let’s try to solve the following MCQs and coding questions.

In this way, you have completed the segment on String, date-time functions. In the next segment, you will learn about Regular Expressions.

Report an error