作者:胡宸宸 | 来源:互联网 | 2023-08-06 11:36
ImtryingtocreateavisualizedchartusingJqueryHighchartsplug-in.我正在尝试使用JqueryHighcharts插件
I'm trying to create a visualized chart using Jquery Highcharts plug-in.
我正在尝试使用Jquery Highcharts插件创建可视化图表。
But I'm unable to write a Query to create data which is needed to insert the JS.
但我无法编写查询来创建插入JS所需的数据。
What I need to do is to show the customer, how many unique visitors clicked his Job Ad. You can see the final output what I'm trying to do;
我需要做的是向客户展示有多少独立访客点击了他的招聘广告。你可以看到我想要做的最终输出;
And this is a part of required JS;
这是所需JS的一部分;
xAxis: {
categories: ['01.05', '02.05', '03.05', '04.05', '05.05',
'06.05', '07.05','08.05']
},
series: [{
name: 'Unique',
data: [12,8,9,10,5,4,11,30]
}]
Table with the statistics;
表与统计;
Job_Ad_Statistics
-----------------
jobID, jobstat_Date, job_statUnique
1 07.05.2011 0
1 07.05.2011 1
1 07.05.2011 1
2 06.05.2011 1
3 06.05.2011 1
1 05.05.2011 1
1 04.05.2011 1
*Currently, table has 20k rows.
I need to get multiple Count where job_statUnique=1 AND jobstat_Date is between now AND 7 days earlier from now in order to insert the data to Series field.
我需要得到多个Count,其中job_statUnique = 1 AND jobstat_Date介于现在和之前7天之间,以便将数据插入到Series字段中。
Expected Result:
----------------
Day Unique_ViewCount_of_jobID (Assuming ID 1)
.... start from 7 days earlier
02.05 0
03.05 0
04.05 1
05.05 1
06.05 0
07.05 2
08.05 0 - today
Thanks for help.
感谢帮助。
2 个解决方案