Commit ed7c6985 authored by 高雅喆's avatar 高雅喆

add device_search_tag

parent 6b98b64d
......@@ -567,12 +567,17 @@ object GetDevicePortrait {
device_search_tag.createOrReplaceTempView("tag_count")
val max_count_tag_= sc.sql(
val max_count_tag = sc.sql(
s"""
|select a.device_id,a.stat_date,a.cid_id,a.level1_count
|from
|from tag_count a
|inner join
|(select device_id,max(level1_count) as max_count from tag_count group by device_id) b
|on a.level1_count = b.max_count and a.device_id = b.device_id
""".stripMargin
)
max_count_tag.show()
println(max_count_tag.count())
// GmeiConfig.writeToJDBCTable(diary_tag,"diary_feat",SaveMode.Overwrite)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment