資料表
id uid info
1 1001 {"name":"周年慶","status":0,"addtime":"2017-10-10"}
2 1002 [ {"name":"周年慶","status":0,"addtime":"2017-10-11"},{"name":"特價促銷","status":0,"addtime":"2017-10-12"}]
3 1003 [ {"name":"特價促銷","status":0,"addtime":"2017-10-12"},{"name":"國慶促銷","status":0,"addtime":"2017-09-28"}]特價
我想查詢同時參加了周年慶和特價促銷的用戶的uid,應該怎么寫查詢陳述句?
uj5u.com熱心網友回復:
select uid from 表名 where (info like '%周年慶% ' and info like '%特價促銷%')uj5u.com熱心網友回復:
在hive中資料info的資料格式為json陣列,無法直接用like進行匹配轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/69870.html
標籤:MySQL
上一篇:an error occurred while creating the instance toadf40,the return code is 1950 ,c
