Find Python Developer (with.MySQL)
This article is about Python Developer Search (with.MySQL).
I want to solve the coding test problem, find out how to solve it differently from the retrospective of the problem I solved, and get to know.
Letās get to the problem first.
Problem
You want to query the information of a developer with Python skills in the DEVELOPER_INFOS table.
Please write a SQL statement that looks up the ID, email, name, and last name of a developer with Python skills.
Please arrange the results in ascending order based on the ID.
Problem Description
The DEVELOPER_INFOS table is a table that contains information about developersā programming skills.
The table structure of DEVELOPER_INFOS is as follows: ID, FIRST_NAME, LAST_NAME, EMAIL, SKILL_1, SKILL_2, and SKILL_3 mean ID, name, last name, email, first skill, second skill, and third skill, respectively.
DEVELOPER_INFO Table
NAME | TYPE | UNIQUE | NULLABLE |
---|---|---|---|
ID | VARCHAR(N) | Y | N |
FIRST_NAME | VARCHAR(N) | N | Y |
LAST_NAME | VARCHAR(N) | N | Y |
VARCHAR(N) | Y | N | |
SKILL_1 | VARCHAR(N) | N | Y |
SKILL_2 | VARCHAR(N) | N | Y |
SKILL_3 | VARCHAR(N) | N | Y |
problem solving
SELECT ID, EMAIL, FIRST_NAME, LAST_NAME
FROM DEVELOPER_INFOS
WHERE "Python" IN (SKILL_1, SKILL_2, SKILL_3)
ORDER BY ID;
Solution Description
This SQL query queries information from developers with specific skills and returns results sorted by developer ID.
The query extracts data from the DEVELOPER_INFOS table, and the main components are as follows.
First, the SELECT section specifies the columns to look up.
ID is the developerās unique identifier, EMAIL is the developerās email address, and FIRST_NAME and LAST_NAME are the developerās first and last names, respectively, and these four information are output as a result.
The FROM section then specifies the default table on which to run the query.
In this case, the DEVELOPER_INFOS table is used.
Next, in the WHERE section, you set specific conditions to filter the data you need.
āPythonā IN (SKILL_1, SKILL_2, SKILL_3) selects any of the three technologies owned by the developer that contain āPythonā.
This allows only developers with Python technology to look up.
Finally, sort the results through the ORDER BY clause.
You can sort the result in ascending order based on the ID, in order of developer ID.
This query allows you to look up the ID, email, first name, and last name of developers with Python technology.
This makes it easy to identify information about developers with specific skills and can be useful for analysis or recruitment processes based on technical capabilities.