Из приведенного ниже выберите ответ. Как я могу добавить пункт «где» для фильтрации рейсов между запрошенным временем прибытия.
cqlsh:api_itl> select * from generic_response_1;
trace-id | result-index | api | base_price | fare_selection | fare_type | flights | sale_price | special_instructions | total_duration
--------------------------------------+--------------+-----+------------+----------------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------------------+----------------
39485363-cc22-4eff-a502-6d860931c3fb | IB56 | tbo | 8400 | Retail | ADT | [{arrival_date_time: '23-03-2019 14:10', carrier_iata: 'UK', carrier_id: 'UK 816', carrier_name: 'Air Vistara', class_code: 'Q', departure_date_time: '23-03-2019 11:30', flight_duration: 160, field_7_: 'BLR', to: 'DEL', via: ''}, {arrival_date_time: '23-03-2019 22:40', carrier_iata: 'UK', carrier_id: 'UK 835', carrier_name: 'Air Vistara', class_code: 'Q', departure_date_time: '23-03-2019 19:55', flight_duration: 165, field_7_: 'DEL', to: 'MAA', via: ''}] | 9485 | null | 670
39485363-cc22-4eff-a502-6d860931c3fb | OB4 | tbo | 1000 | Retail | ADT | [{arrival_date_time: '08-03-2019 14:55', carrier_iata: '6E', carrier_id: '6E 119', carrier_name: 'Indigo', class_code: 'Q', departure_date_time: '08-03-2019 13:55', flight_duration: 60, field_7_: 'MAA', to: 'BLR', via: ''}] | 1770 | null | 60
(2 rows)
cqlsh:api_itl>
Структура базы данных для данного вывода
CREATE TYPE api_itl.flight (
arrival_date_time text,
carrier_iata text,
carrier_id text,
carrier_name text,
class_code text,
departure_date_time text,
flight_duration int,
"from" text,
"to" text,
via text
);
CREATE TABLE api_itl.generic_response_1(
"trace-id" uuid,
"result-index" text,
api text,
base_price float,
fare_selection text,
fare_type text,
flights list<frozen<flight>>,
sale_price float,
special_instructions list<text>,
total_duration int,
PRIMARY KEY ("trace-id", "result-index")
)