sillyql / tests / test-3.txt
test-3.txt
Raw
# more complicated test,
CREATE friends 5 string string bool int string name vibe is_cool distance town
INSERT INTO friends 10 ROWS
Izzy Edgy true 1000 Ann_Arbor
Izzy Funny false 1000 Ann_Arbor
Sam Cool true 30 Ann_Arbor
Tyler Nice true 9000 Mt_Clemens
Tyler Mean false 400 Mt_Clemens
Bri Fun false 100 Ann_Arbor
Jack Edgy true 1000 Ann_Arbor
Brian Smart true 1000 Ann_Arbor
Abby Loud false 10 Ann_Arbor
Ben Scary false 10000 Los_Angeles
PRINT FROM friends 3 name vibe town ALL
GENERATE FOR friends hash INDEX ON town
DELETE FROM friends WHERE name = Bri
CREATE work 3 string bool bool kind working done
INSERT INTO work 3 ROWS
Coding true false
Serving false true
Crying true false
JOIN work AND friends WHERE done = is_cool AND PRINT 3 working 1 distance 2 kind 1
REMOVE friends
PRINT FROM work 2 kind working WHERE working = true
REMOVE work
QUIT