Skip to content

Commit d63188f

Browse files
committed
updated duality views
1 parent 6e501e5 commit d63188f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sql/json-duality.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ customer @insert @update @delete
109109
age : age,
110110
yrs_customer : yrs_customer
111111
streams : streams @insert @update @delete
112-
[{
113-
cust_id : cust_id
112+
[{
114113
day_id : day_id
115114
genre_id : genre_id
116115
movie_id : movie_id
@@ -121,10 +120,10 @@ customer @insert @update @delete
121120
select *
122121
from customer_streams_dv;
123122

124-
-- Query the duality view using JSON functions. Pull back the customers watching romance movies
123+
-- Query the duality view using JSON functions. Pull back the customers who have been around for 10 years
125124
select *
126125
from customer_streams_dv
127-
where JSON_VALUE(data,'$.streams.genre_id')=19;
126+
where JSON_VALUE(data,'$.yrs_customer') > 10;
128127

129128

130129
/* Now to insert a new record into customers and streams we can do that through the Duality View.

0 commit comments

Comments
 (0)