Posts

Showing posts from March, 2023

6 Sorting Data with ORDER BY - A Funny Take with Amit Bhadana Characters Part 2

Image
Suppose we have a table named "amit_bhadana_characters" with the following columns: "name", "age", and "catchphrase". Here are some sample rows: name age catchphrase Amit Bhadana 27 "Aalas Hatao, Life Banao" Babloo bhaiya 35 "Babloo Bhaiya ka style" Sameer bhaiya 30 "Kya bolte bantai" Genda bhaiya 40 "Hum Genda bhaiya hai" Now let's say we want to sort this table based on the "age" column in ascending order. We would use the following SQL statement:Copy code SELECT * FROM amit_bhadana_characters ORDER BY age ASC ; This would give us the following result: name age catchphrase Amit Bhadana 27 "Aalas Hatao, Life Banao" Sameer bhaiya 30 "Kya bolte bantai" Babloo bhaiya 35 "Babloo Bhaiya ka style" Genda bhaiya 40 "Hum Genda bhaiya hai" Similarly, if we want to sort in descending order, we would use the following SQL statement: SELECT * FROM amit_bhada

5 Sorting Data with ORDER BY - A Funny Take with Amit Bhadana Characters Part 1

Image
If you're new to SQL, you might be wondering how you can sort the data in your tables. Sorting data in SQL is simple and easy with the ORDER BY clause. You can use ORDER BY to sort data in ascending or descending order based on one or more columns. To help you understand this concept, we'll take the example of Amit Bhadana characters. Amit Bhadana is a popular Indian YouTuber known for his funny videos and characters. Let's say we have a table called "amit_bhadana_characters" that lists all of his popular characters, their catchphrases, and the number of subscribers they have. Here's what our table looks like: Character Name Catchphrase Subscribers Babloo Babloo ka pucchta hai, kya bolti 2.5M Amit Bhadana Ye mere saath bhi ho chuka hai 20M Sameer Bhai ka maal hai! 3M Raju Raju ka style hai ye! 1M Sultan Ek like toh banta hai yaar! 5M Now let's say we want to sort this table in descending order by the number of subscribers each character has. We can do this