DataStax
Studio
Schema
default localhost
Connection
Schema
  • real_estateCQL Keyspace
    • Tables
    • User Defined Types
    • User Defined Functions
    • User Defined Aggregates
    • Materialized Views
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CREATE KEYSPACE IF NOT EXISTS real_estate
WITH REPLICATION = { 'class': 'SimpleStrategy',
'replication_factor': 1 }
AND DURABLE_WRITES = true;
USE real_estate;
/*-----------------*/
CREATE TYPE IF NOT EXISTS real_estate.address(
street text,
city text,
state text,
zip_code text
);
CREATE TYPE IF NOT EXISTS listing_standard(
street text,
zip_code text,
asking_price int,
thumbnail blob
);
CREATE TABLE IF NOT EXISTS listings_by_realtor_primarykey(
listing_id uuid,
listing_detail listing_standard,
realtor_co_name text,
realtor_co_address address,
city_id uuid,
city_name text,
city_population int,
city_rating float,
state_name text,
state_energy_drink text,
state_region text,
PRIMARY KEY( (listing_id) )
);
select * from listings_by_realtor_askingprice
where realtor_co_name = 'Cirrus' and state_name = 'California' and city_name = 'San Francisco'
and asking_price >= 1100000 and asking_price < 1800000;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
indexrealtor_co_name state_name city_name asking_price listing_id realtor_co_address city_id city_population city_rating listing_detail state_energy_drink state_region
0
Cirrus
California
San Francisco
1100000
ccf42023-91d2-4f8c-8fc1-7183299b761d
{"street":"570 Elm","city":"Detroit","state":"Michigan","zip_code":"48202"}
73bb50fa-d507-457c-8bc1-8789e09a71cd
884363
4.7
{"street":"67 Juice","zip_code":"94102","thumbnail":null}
Rockstar
Pacific
1
Cirrus
California
San Francisco
1790000
3807aa99-da4f-47b3-9f3f-31241b54914f
{"street":"570 Elm","city":"Detroit","state":"Michigan","zip_code":"48202"}
73bb50fa-d507-457c-8bc1-8789e09a71cd
884363
4.7
{"street":"6667 Milk","zip_code":"94109","thumbnail":null}
Rockstar
Pacific
1
Displaying 1 - 2 of 2 results for the last statement
Success. 2 elements returned. Duration: 0.011 s.