diff --git a/3.3.cpp b/3.3.cpp index 6beeaf2..c8d2112 100644 --- a/3.3.cpp +++ b/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> vec; @@ -105,6 +116,7 @@ int main() ofstream ofs("result/3.3.csv"); #define cout ofs + cout<<"岗位名称,需求量"<