Skip to content

Instantly share code, notes, and snippets.

@lifuzu
Created February 4, 2016 06:13
Show Gist options
  • Select an option

  • Save lifuzu/7080eadf72d38778f6c7 to your computer and use it in GitHub Desktop.

Select an option

Save lifuzu/7080eadf72d38778f6c7 to your computer and use it in GitHub Desktop.
Cloud Computing Capstone Question 3.2 Solution
USE mykeyspace;
SELECT * FROM task1_part2_group3_2 WHERE origin = 'CMI' AND through = 'ORD' AND dest = 'LAX' AND first_date = '04/03/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'JAX' AND through = 'DFW' AND dest = 'CRP' AND first_date = '09/09/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'SLC' AND through = 'BFL' AND dest = 'LAX' AND first_date = '01/04/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'SFO' AND dest = 'PHX' AND first_date = '12/07/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'DFW' AND through = 'ORD' AND dest = 'DFW' AND first_date = '10/06/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'ORD' AND dest = 'JFK' AND first_date = '01/01/2008';
$ bash question3_2.sh
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
CMI | ORD | LAX | 04/03/2008 | 0
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
JAX | DFW | CRP | 09/09/2008 | 1
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
SLC | BFL | LAX | 01/04/2008 | 18
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
LAX | SFO | PHX | 12/07/2008 | 0
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
DFW | ORD | DFW | 10/06/2008 | 0
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
LAX | ORD | JFK | 01/01/2008 | 1
(1 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment