Using SQL to Play ‘Have You Ever?’ Advanced SQL techniques part 2: collect_list, group_concat, agg_array, string_agg, and more
Learning to use advanced SQL techniques can help you in two ways. It enables you to get to insights faster and, if you are using the output for further analysis, you can clean and format the data in the most efficient layout. What if your data already arrived in a nicely formatted list that you can use directly in python? Let’s review a few techniques across different databases, continuing to use the severe weather details data I have used in previous articles.
Rather than just cover the syntax of the code, though that is very important, I want to focus on business use cases. Learning how to figure out which technique helps you answer the business question is essential. To make it enjoyable, I like to focus on questions that just outside the range of typical. Ok, the Sharknado article was a bit out there.
Florida, Have You Ever …had a weather event that caused loss of life?
Give me a list of all of the types of events where deaths occurred.
The answer depends on your database. Each database may require a slightly different variation of SQL. It also depends on how you want your result formatted.
Things to consider:
How will the requestor use this list? If they are going to pass it to a python program, you want to provide a different format that if they’re going to cut and paste the list into a PowerPoint presentation.
Do you want that list sorted? Do you want the list deduped?
SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.
Become a data analysis expert using the R programming language in this [data science](https://360digitmg.com/usa/data-science-using-python-and-r-programming-in-dallas "data science") certification training in Dallas, TX. You will master data...
Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments. Our latest survey report suggests that as the overall Data Science and Analytics market evolves to adapt to the constantly changing economic and business environments, data scientists and AI practitioners should be aware of the skills and tools that the broader community is working on. A good grip in these skills will further help data science enthusiasts to get the best jobs that various industries in their data science functions are offering.
Data science is omnipresent to advanced statistical and machine learning methods. For whatever length of time that there is data to analyse, the need to investigate is obvious.
You will discover Exploratory Data Analysis (EDA), the techniques and tactics that you can use, and why you should be performing EDA on your next problem.