sql:
SELECT
str_to_date(concat(yearweek(ads_temp.Date), 'Sunday'), '%X%V %W') AS Date,
concat(truncate(SUM(sales)/SUM(sale_amount) * 100,2),'%') AS 运营广告销售额占比
FROM ads_temp
GROUP BY str_to_date(concat(yearweek(ads_temp.Date), 'Sunday'), '%X%V %W')
ORDER BY str_to_date(concat(yearweek(ads_temp.Date), 'Sunday'), '%X%V %W') ASC;
Problem description:
The line chart cannot be selected for visualization. It is gray, and the average value column is percentage
I know this method, but I must ensure that the data of this line chart is a percentage, because I want to add this chart to another line chart. As the data is updated, the percentage will jump to the decimal point