更新 '3.3.cpp'
parent
2e6af953f7
commit
c5d0f8a433
12
3.3.cpp
12
3.3.cpp
|
@ -91,6 +91,17 @@ int main()
|
|||
});
|
||||
});
|
||||
|
||||
conn.exec("use bigdata2",nullptr);
|
||||
conn.exec("select title,count(*) as want_num from pages where ( title like '%大数据%' ) group by title order by want_num desc",[&](MySQLResult& res)
|
||||
{
|
||||
res.stepRow([&](char** val,unsigned long* len)
|
||||
{
|
||||
string city(val[0]);
|
||||
int cc=ParseInt(val[1]);
|
||||
dmp[Trim(city)].push_back(cc);
|
||||
});
|
||||
});
|
||||
|
||||
fn1(dmp);
|
||||
|
||||
vector<pair<string,int>> vec;
|
||||
|
@ -105,6 +116,7 @@ int main()
|
|||
|
||||
ofstream ofs("result/3.3.csv");
|
||||
#define cout ofs
|
||||
cout<<"岗位名称,需求量"<<endl;
|
||||
int szLoop=min(10u,vec.size());
|
||||
for(int i=0;i<szLoop;i++)
|
||||
{
|
||||
|
|
Reference in New Issue