Fix syntax

This commit is contained in:
l1tsolaiki 2021-07-04 22:34:34 +03:00
parent 9f05b387e5
commit 3f8a22c35d

View File

@ -46,5 +46,5 @@ CREATE TABLE 01889_sql_json (json String) ENGINE = MergeTree ORDER BY json;
INSERT INTO 01889_sql_json(json) VALUES('{"name":"Vitali","surname":"Brown","friends":["Katya","Anatoliy","Ivan","Oleg"]}');
INSERT INTO 01889_sql_json(json) VALUES('{"name":"Ivan","surname":"Ivanov","friends":["Vasily","Kostya","Artyom"]}');
INSERT INTO 01889_sql_json(json) VALUES('{"name":"Katya","surname":"Baltica","friends":["Tihon","Ernest","Innokentiy"]}');
SELECT JSON_QUERY('$.friends[0 to 2]', json);
SELECT JSON_QUERY('$.friends[0 to 2]', json) FROM 01889_sql_json;
DROP TABLE 01889_sql_json;