Skip to content

Instantly share code, notes, and snippets.

@lifuzu
Created February 17, 2016 19:18
Show Gist options
  • Save lifuzu/491b494836553a75e859 to your computer and use it in GitHub Desktop.
Save lifuzu/491b494836553a75e859 to your computer and use it in GitHub Desktop.
Cloud Computing Capstone Question 3.2 Solution for Task2
USE mykeyspace;
SELECT * FROM task1_part2_group3_2 WHERE origin = 'BOS' AND through = 'ATL' AND dest = 'LAX' AND first_date = '03/04/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'PHX' AND through = 'JFK' AND dest = 'MSP' AND first_date = '07/09/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'DFW' AND through = 'STL' AND dest = 'ORD' AND first_date = '24/01/2008';
SELECT * FROM task1_part2_group3_2 WHERE origin = 'LAX' AND through = 'MIA' AND dest = 'LAX' AND first_date = '16/05/2008';
$ bash question3_2.sh
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
BOS | ATL | LAX | 03/04/2008 | 7
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
PHX | JFK | MSP | 07/09/2008 | 0
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
DFW | STL | ORD | 24/01/2008 | 0
(1 rows)
origin | through | dest | first_date | delay
--------+---------+------+------------+-------
LAX | MIA | LAX | 16/05/2008 | 10
(1 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment