SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’
.
C
l
u
s
t
e
r
I
D
′
)
A
S
c
h
a
r
)
a
s
o
i
d
F
R
O
M
‘
t
c
a
b
l
e
‘
w
h
e
r
e
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.ClusterID') AS char) as oid FROM `t_cable` where attributes_json->'
.ClusterID′)ASchar)asoidFROM‘tcable‘whereattributesjson−>′.ClusterID’ > ‘0307000074’;
#select * from t_cable c where [project_code]=‘TOMSerbia’;
SELECT distinct json_keys(attributes_json) as “keys” FROM t_cable;
SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’
.
C
l
u
s
t
e
r
I
D
′
)
A
S
c
h
a
r
)
a
s
o
i
d
F
R
O
M
‘
t
c
a
b
l
e
‘
;
S
E
L
E
C
T
d
i
s
t
i
n
c
t
C
A
S
T
(
J
S
O
N
U
N
Q
U
O
T
E
(
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.ClusterID') AS char) as oid FROM `t_cable`; SELECT distinct CAST(JSON_UNQUOTE(attributes_json->'
.ClusterID′)ASchar)asoidFROM‘tcable‘;SELECTdistinctCAST(JSONUNQUOTE(attributesjson−>′.ClusterID’) AS char) as oid FROM t_cable
where attributes_json->’$.ClusterID’ > ‘0307000074’;
select * from t_cable where attributes_json->’
.
E
n
d
I
D
′
=
′
020100005
4
′
a
n
d
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.EndID' = '0201000054' and attributes_json->'
.EndID′=′0201000054′andattributesjson−>′.ClusterID’ >= ‘0307000064’;
select * from t_cable where attributes_json->’
.
E
n
d
I
D
′
=
′
020100005
4
′
a
n
d
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.EndID' = '0201000054' and attributes_json->'
.EndID′=′0201000054′andattributesjson−>′.ClusterID’ >= ‘0307000064’;
SELECT COUNT(0) FROM t_cable WHERE project_code=‘TOMSerbia’ and attributes_json->’ . E n d I D ′ = ′ 020100005 4 ′ a n d a t t r i b u t e s j s o n − > ′ .EndID'='0201000054' and attributes_json->' .EndID′=′0201000054′andattributesjson−>′.ClusterID’>=‘0307000064’;
SELECT distinct CAST(JSON_UNQUOTE(attributes_json->’
.
C
l
u
s
t
e
r
I
D
′
)
A
S
c
h
a
r
)
a
s
o
i
d
F
R
O
M
‘
t
c
a
b
l
e
‘
;
S
E
L
E
C
T
c
o
u
n
t
(
d
i
s
t
i
n
c
t
C
A
S
T
(
J
S
O
N
U
N
Q
U
O
T
E
(
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.ClusterID') AS char) as oid FROM `t_cable`; SELECT count(distinct CAST(JSON_UNQUOTE(attributes_json->'
.ClusterID′)ASchar)asoidFROM‘tcable‘;SELECTcount(distinctCAST(JSONUNQUOTE(attributesjson−>′.ClusterID’) AS char)) as c FROM t_cable
where attributes_json->’
.
C
l
u
s
t
e
r
I
D
′
;
S
E
L
E
C
T
c
o
u
n
t
(
d
i
s
t
i
n
c
t
J
S
O
N
U
N
Q
U
O
T
E
(
a
t
t
r
i
b
u
t
e
s
j
s
o
n
−
>
′
.ClusterID'; SELECT count(distinct JSON_UNQUOTE(attributes_json->'
.ClusterID′;SELECTcount(distinctJSONUNQUOTE(attributesjson−>′.ClusterID’)) as c FROM t_cable
where attributes_json->’$.ClusterID’;