如何根据表名studentdb
查询表的所有详细信息?
+-----------+------------+------------+
| tags.path | tags.value | gender data
+-----------+------------+------------+
| id/name | Ram | male
+-----------+------------+------------+
| id/name | Leela | female
+-----------+------------+------------+
| id/number | 123 | null
+-----------+------------+------------+
| id/number | 456 | null
+-----------+------------+------------+
| id/name | hello | null
+-----------+------------+------------+
答案 0 :(得分:0)
我实际上想知道拉姆(Ram)这个名字出现了多少次– 3分钟前是特里(terry)
取决于表的实际架构是什么:
SELECT COUNT(*) c
FROM `table`, UNNEST(tags) t
WHERE t.path = 'id/name' AND t.value='Ram'