Created
October 6, 2015 14:58
-
-
Save ijokarumawak/3108e1fde2a57b94a540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// r.scheduleでUNNEST | |
SELECT META(r).id as rid, r.airlineid, r.equipment, s.flight, s.utc | |
FROM `travel-sample` r | |
UNNEST r.schedule AS s | |
WHERE r.sourceairport = "SFO" | |
AND r.destinationairport = "LAX" | |
ORDER BY rid ASC, s.utc ASC | |
LIMIT 2; | |
// 結果 | |
[{ | |
"airlineid": "airline_439", | |
"equipment": "738", | |
"flight": "AS639", | |
"rid": "route_11981", | |
"utc": "02:13:00" | |
}, | |
{ | |
"airlineid": "airline_439", | |
"equipment": "738", | |
"flight": "AS599", | |
"rid": "route_11981", | |
"utc": "03:52:00" | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment