Wed. Apr 21st, 2021

if you Work with data But limiting programs like Excel, learning SQL can be the next step on your data journey.

(Getty Images)

This tutorial will show you the basics of SQL, a tool used by programmers, scientists, and others around the world.

SQL is easy to break large amounts of information into digestible parts, and you can learn this language using online resources.

SQL is often called the “sequel”, but it stands for “structured query language”. Think of it as a computer equivalent to asking oral questions.

Suppose your city has a dataset of 911 calls. You may ask, “How many robberies have occurred?” And “What are the most common emergency people called for?”

If you were on the phone with someone, you would ask those questions in a spoken language. On a computer, you need to use a query language such as SQL to communicate with the database.

Typically, SQL is reserved for datasets that are too large to fit in a spreadsheet program like Excel. The language is popular among businesses, financial managers, schools, software engineers, and even journalists who need to present large amounts of information in a more manageable way.

There are many courses available for you to start learning SQL online.

To learn SQL, you need to understand some basic concepts and commands. SQL uses a certain syntax or word order to explain with a database. A database is a collection of data, but usually what someone calls a “database” means a large one, such as hundreds of thousands of 911 calls.

A database manager is a program that connects two or more databases. Like SQL, these programs are often called into play when the database is too large for a spreadsheet.

“SQL is exciting because it’s really powerful,” says Lucia Wallinchus, executive director of the Ohio Center for Journalism, an investigative journalism nonprofit. “This allows you to access massive amounts of data that will crash Excel.”

Walinchus and his team used SQL to extract relevant information from datasets built from property and mortgage records. The result was a story Counting the thousands of dollars that small business owners were losing under a legal flaw.

Getting Started with SQL Query

With SQL, the key is its middle name: query. In this context, a query is a query written in SQL syntax. for example:

SELECT call_time
FROM 911_calls
WHERE call_date = 2020-01-01

It asks the question, “What time did 911 calls come on New Year’s Day 2020?”

Here are some common phrases to make a question:

The select tells the computer what data you want to see. You can say “all” or limit it to certain criteria, such as the ones below.

The FROM tells the computer which dataset you are using. In this case, our dataset is called 911_calls.

WH is similar to its use in English. You only want to see data that meets certain criteria – for example, a call on New Year’s Day.

Group BY is slightly more complex. If the dataset contains a column with matching rows, it groups those rows together.

Arranges its production by order. You can order alphabet, date, number and so on.

Here is a query using all five:

SELECT scanner_code, call_description
FROM 911_calls
WHERE call_date = 2020-01-01
GROUP BY call_description
ORDER BY call_description ASC

This begs the question, “Why did people call 911 on New Year’s Day 2020?”

In this case, we have limited the data we want to see to the same criteria: 911 New Year’s Day. But now the data call is grouped by description and is in alphabetical order.

In advance, we have taken a large amount of information and organized it in a more useful way. Out of hundreds of thousands of calls, we got the ones we want to see and put them in order.

Getting started with work

SQL is also useful for solving math problems quickly. You can do mathematical tasks like dividing, adding, calculating and averaging in your query. for example:

SELECT call_description, COUNT(call_description)
FROM 911_calls
WHERE call_date = 2020-01-01
GROUP BY call_description
ORDER BY COUNT(call_description) DESC

It asks the question, “How much did each call statement come on New Year’s Day?”

When you are working with multiple datasets simultaneously, you can use more powerful commands like JOIN. Try to use math functions like sums moving forward to the next step of W3Schools Interactive Dashboard.

SQL is a language, so it is not limited to a particular software program. Many professionals use My sql or SQL Server, But if you’re just starting out, you can try a more original version, like SQLite Manager.

SQLite Manager is a Firefox Add-on It runs like a regular SQL program in a web browser. That way, you do not have to install software that can confuse your computer settings.

Try playing around in the sandbox – a self-contained environment that lets you execute software or programs and test code. Like an online sandbox Db fiddle Lets you practice questions without affecting other parts of your computer.

Once you have the basic syntax down, you can command and code your data game from a spreadsheet, such as above Python.

“SQL has outlined a lot of effort to change this because it just works,” says Troy Thibodo, who leads a team of data reporters at the Associated Press. “For a lot of data journalists, this is an important step on the path from point-and-click to code.”

Since SQL is so popular, online resources for language learning are widely available. Thibodo wrote guide Which uses a free program called DB Browser. If you like learning through video, consider subscribing a series Produced by the National Institute for Computer-Assisted Reporting of Nonprofit Investigative Reporters and Editors.

Test your skills with the night lab Sql murder mystery. Find a killer in “SQL City” using the crime data in the above examples.

These days, practically every career includes data – even non-technical fields such as construction or The design. Being able to analyze data allows you to stand out from other job candidates.

In some areas, such as business and engineering, you can use these tools right out of the gate. You may not have a job title like “SQL Programmer”, but you can use this language to perform higher-level tasks, such as finding trends in customer shopping habits. Incorporating your SQL experience on your resume can demonstrate your technical proficiency and problem-solving skills.

With an endless stream of data today and the need to understand it better, knowing SQL can boost your career.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *