Have you ever heard of the word query? This term may be unfamiliar to those who do not work in
the IT
industry or are not involved in web production.
In this article, we will explain queries that are frequently used in
SEO
and IT terms. There are many different types of queries, so let’s take a closer look at the meaning of each one.
We will also explain the difference between queries and “SQL”, which is a database language, which is often misunderstood, so please read until the end.
What is a query?
Query means “question” or “inquiry” and is written as “query” in English. In IT terms, a query is a command statement that asks a database management system (DBMS) to perform an operation such as searching for data.
There are multiple types of queries, and the types vary depending on the target database. This may be difficult to understand, so I will explain the query in more detail.

What is a search query?
A search query is a query that is written when you want to search for data, and the content is the search conditions that describe what kind of search you want to perform.
When you search on Google, Yahoo!, etc., you may often enter keywords casually, and the entered keywords are also called search queries. The user enters a keyword and is asking a database question. I will explain it in detail below.

Difference between search query and search keyword
It is difficult to distinguish between a search query and a search keyword, and some people think that a search query = a search keyword. However, in the operation of web advertising, there is a clear distinction between search queries and search keywords. Below we will explain the difference between a search query and a search keyword.
What is a search query?
A search query is the word or phrase that a user actually enters into the search window to search for. It can also be called questions, concerns, and things users want to know. The key is to include not only words but also sentences.
What is a search keyword?
On the other hand, search keywords are “phrases or words used to target users.” The obvious difference is that search queries can also include text, while search keywords generally do not contain text.
Therefore, spelling errors and typos are not taken into consideration. There is also the premise that it will be used to target users.

Search query type 1: Informational query
Informational queries are classified as information type and are search queries entered by users when they are seeking information.
Since the purpose is only to obtain information, there is a high possibility that no action will be taken and it will not lead to
.
Among the three categories of search queries, it accounts for the largest proportion. For example, search queries include “What methods are there for muscle training?” “Guitar chord collection” and “What is rear charging?”

Search query type 2: Navigational query
Navigational queries are classified as guided search queries entered by users who want to access a specific website.
Since not everyone knows about a particular website, it is the least common of the three types of search queries.
For example, there are many single words such as “ProFuture Inc.”, “MarketTRUNK”, and “Google”, and users often have a clear image of where they want to access.
Search query type 3: Transactional query
Transactional queries are classified as transactional queries and are search queries entered by users who are in the process of taking some action, such as purchasing a product, requesting information, or making an inquiry. It often takes the form of “product name or service name” + “action”, and has the characteristic of easily connecting to CV.
For example, it shows a high level of motivation to take action such as “Water mail order”, “Cloud server trial”, “Where is a good ramen restaurant in Tokyo?”, and it is also characterized by being able to confirm a large number of phrases and combinations of words.
Reference: What is a Yahoo search query?
(https://ads-promo.yahoo.co.jp/service/start-articles/basic/what-query/)
What is a query parameter?
A query is a search condition, and parameters are variables. In other words, query parameters are “displayed content that changes depending on search conditions.” Details are explained below.
What is a query parameter?
Query parameters are character strings attached to the end of a URL, and are responsible for conveying various information to the web server.
For example, the URL of our website
https://www..co.jp/mk/download/37421?from=popup
If so, the part of “?from=popup” after “?” will be the query parameter.
The “?” declares that “from now on, this is a query parameter,” and specifies “popup” as the value of the parameter (variable) named “from.” As mentioned above, the basic structure of the query parameters is as follows.
By the way, if there are multiple parameters, use the symbol “&” to connect them. This query parameter is also called a “URL parameter,” “query string,” or “query string.”
Meaning of query parameter symbols
The meanings of symbols used in query parameters are as follows.
| ? (question mark) | Add query parameters |
| = (equals) | give name and value |
| & (ampersand) | Add multiple query parameters |
| #(hash) | Insert in-page link |
Two types of query parameters
There are two types of query parameters, each for a different purpose.
passive parameters
Passive parameters are also called dummy parameters, and the displayed page does not change even if the parameters are assigned.
Passive parameters are mainly used for access analysis, and their role is to collect information. By assigning unique parameters, you will be able to identify the source of user inflows and analyze data.
For example, on a web page, by assigning unique passive parameters to multiple links that lead to the same destination, you can determine which link source the user came from.
active parameters
On the other hand, the display contents of active parameters change by adding parameters. Active parameters are mainly used in dynamic pages such as search.
For example, on e-commerce sites, users can sort and filter by adding parameters associated with the product on that page to the end of the URL of each product page. . This is an effective parameter when you want to build a so-called filtered search function.

What is the query function (QUERY function)?
What is the query function (QUERY function)?
The query function (QUERY function) is a function that can output the data contents of a selected range in
Excel data, Google spreadsheets, etc.
to another sheet.
Normally, if you just output to another sheet, you can do the same thing by copying and pasting, but in that case, if the copy source data changes, you will need to manually modify the copy destination data.
In such cases, by using a query function to output data to a separate sheet, the data at the copy destination will be automatically updated even if the data at the copy source is rewritten. This is an effective function when multiple people share the same data using multiple sheets.
Types of query functions (QUERY functions)
The types of basic query functions (QUERY functions) are as follows.
| select | Extracts selected columns in specified order |
| where | Extract only the information you want from the selected range |
| group by | Aggregates the values of the same element in the specified column |
| order by | Sorts based on the specified column |

What is a SQL query?
Some queries, which are imperative statements, include the language required to query the database. SQL exists within that language.
SQL is a language for operating databases, and is currently the standard language for operating databases. An SQL query is a statement written according to the usage of the SQL language.
When the word query is used, it usually means an SQL query.
Difference between SQL and query
Up to this point, we have explained queries and SQL, but some people may be confused by the concepts of SQL and queries, which sound similar. So what is the difference between SQL and query?
To put it simply, SQL is a language for manipulating databases, and it means a word that follows certain rules, just like C language, etc.
On the other hand, a query can be thought of as an instruction statement to a database management system, and it can be thought of as representing the content of the word SQL itself.
For example, if you say “process” in Japanese, it would be easier to understand if you say that the command sentence “process” is a query, and the Japanese word is SQL.

SQL injection overview
Also, have you ever heard of the term SQL injection? SQL injection is an attack method that attempts to manipulate a database by sending invalid SQL statements.
Injection means injection or injection. When a malicious SQL statement is sent targeting a vulnerable site or application, database information may be leaked, deleted, or tampered with, and the system may be hijacked. Masu. Cyber attacks have been occurring frequently in various countries in recent years, and SQL injection is one of them.
Leakage of personal information or customer information may result in a claim for compensation, so to prevent such a situation, it is essential to take measures against SQL injection when creating a site.
How to prevent SQL injection
It may be technically difficult to completely prevent SQL injection. However, you can take precautions. The way to prevent SQL injection is through regular maintenance of the infrastructure environment. This may include regularly updating your servers and security software.
Additionally, leaving vulnerabilities in your app will make it susceptible to attacks using invalid SQL statements. To prevent this from happening, please perform vulnerability assessment on your app and fix any weak areas in your app.

7 ways to run SQL queries
An SQL query is a statement written using the SQL language on a database called a relational database (RDB).
Relational databases, also known as relational databases, are formatted as tables with rows and columns. A row represents one piece of data, a column represents an item, and the intersection of a row and column is called a field. A relational database is a database that manages data in rows and columns and can relate multiple tables, and some of you may be familiar with it because it is currently widely used.
SQL queries are written on this relational database. Armed with the above knowledge, let’s take a look at seven ways to execute SQL queries.
SQL queries include DDL, which is an instruction statement that creates tables that store data (data definition language), DML, which is an instruction statement that manipulates data (data manipulation language), and DCL, which is an instruction statement that controls data (data definition language). data management language).
What we will introduce this time are CREATE, ALTER, and DROP in DDL, and SELECT, UPDATE, INSERT, and DELETE in DML.
Now, I will explain them one by one.
CREATE
CREATE is a statement that creates a database or a table on a database.
ALTER
ALTER is a statement that changes the characteristics of a table in a database.
DROP
DROP is a statement that removes a table from the database. Unlike DELETE, which will be introduced later, this does not mean deleting the data on the table, but rather deleting the table itself from the database.
SELECT
SELECT is a command statement that refers to and extracts data from a specified table in a database by specifying conditions.
SELECT is the most basic and important statement in SQL queries. It has a variety of description patterns and options, and is a highly performant statement that can produce a variety of effects depending on how you use it.
UPDATE
UPDATE is a statement that updates certain data that already exists in a table.
INSERT
INSERT is a statement that adds one or more new pieces of data to a database table.
DELETE
DELETE is a statement that deletes one or more pieces of data in a table under specified conditions.

Environment required for SQL execution
This section explains the environment required to execute SQL. There are two ways to prepare the environment necessary for SQL execution.
①: Create an SQL environment on your computer
The first method is to create an SQL environment on your computer. If you want to create a SQL environment, install MySQL, the world’s most used open source database.
MySQL is easy to install, even for beginners, and is relatively easy to operate. Additionally, there is a wealth of articles and content that explain MySQL, so even if you don’t understand, you can quickly get information online.
②: Use a web service that can execute SQL
The second method is to use a web service that can execute SQL. SQL can be executed without having to set up an environment on your own computer. If it is difficult to create an SQL environment, use a web service called “paiza.IO”.
“paiza.IO” is a web service that provides an environment where you can write code and execute programs online. Even beginners can easily execute SQL and program in a fast and stable communication environment.

summary
In this article, we have provided an overview of queries and explained the various types of queries. If you are not familiar with web production or programming languages, it may be difficult to understand what a query is, but the word query is used frequently in IT terms.
Understanding the differences between the queries introduced here is the first step to starting web production. Let’s understand the differences between queries so that we can write them ourselves.

