Get the App
SLTechnology News&Howtos  ›  Database  › 

How does mysql realize the transfer of batch data to arrays?

Shulou Source: shulou.com Published: 2022-06-01 18:57:14 11月17日 Update

Requirements Analysis:

As shown in the figure:

In the excel file shown in the figure above, the corresponding ad bits under each field are rendered as an array as shown in the following image lock:

Solution:

1. First, use mysql client Navicat for MySQL to import excel files in batches and build tables.

2. Then use the mysq function GROUP_CONCAT as follows:

Select 'country', country,GROUP_CONCAT (placementid) from 2019q2group by country union allselect' year', year,GROUP_CONCAT (placementid) from 2019q2group by year union allselect 'quarter', quarter,GROUP_CONCAT (placementid) from 2019q2group by quarter

These are the details of mysql converting a large amount of data into arrays, please pay attention to other related articles!

Tags: Array file data image above content function field customer client that is advertisement form article scheme method more solution requirements such as figure analysis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Linux MySQL Shulou Technology