Contents

Find Python Developer (with.MySQL)

   Nov 20, 2024     2 min read

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

NAMETYPEUNIQUENULLABLE
IDVARCHAR(N)YN
FIRST_NAMEVARCHAR(N)NY
LAST_NAMEVARCHAR(N)NY
EMAILVARCHAR(N)YN
SKILL_1VARCHAR(N)NY
SKILL_2VARCHAR(N)NY
SKILL_3VARCHAR(N)NY

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.