| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- [
- {
- "name":"Sample: Top salary",
- "desc":"Top salary 2007 above $100k",
- "type":"0",
- "data":{
- "query":{
- "query":"SELECT sample_07.description, sample_07.salary\r\nFROM\r\n sample_07\r\nWHERE\r\n( sample_07.salary > 100000)\r\nORDER BY sample_07.salary DESC\r\nLIMIT 1000",
- "type":0,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Salary growth",
- "desc":"Salary growth (sorted) from 2007-08",
- "type":"0",
- "data":{
- "query":{
- "query":"SELECT s07.description, s07.salary, s08.salary,\r\n s08.salary - s07.salary\r\nFROM\r\n sample_07 s07 JOIN sample_08 s08\r\nON ( s07.code = s08.code)\r\nWHERE\r\n s07.salary < s08.salary\r\nORDER BY s08.salary-s07.salary DESC\r\nLIMIT 1000",
- "type":0,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Job loss",
- "desc":"Job loss among the top earners 2007-08",
- "type":"0",
- "data":{
- "query":{
- "query":"SELECT s07.description, s07.total_emp, s08.total_emp, s07.salary\r\nFROM\r\n sample_07 s07 JOIN \r\n sample_08 s08\r\nON ( s07.code = s08.code )\r\nWHERE\r\n( s07.total_emp > s08.total_emp\r\n AND s07.salary > 100000 )\r\nORDER BY s07.salary DESC\nLIMIT 1000",
- "type":0,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Customers",
- "desc":"Email Survey Opt-Ins, Customers for Shipping ZIP Code, Total Amount per Order",
- "type":"0",
- "data":{
- "query":{
- "query": "-- Get email survey opt-in values for all customers\nSELECT\r\n c.id,\r\n c.name,\r\n c.email_preferences.categories.surveys\r\nFROM customers c;\n\n\n\n-- Select customers for a given shipping ZIP Code\nSELECT\r\n customers.id,\r\n customers.name\r\nFROM customers\r\nWHERE customers.addresses['shipping'].zip_code = '76710';\n\n\n\n-- Compute total amount per order for all customers\nSELECT\r\n c.id AS customer_id,\r\n c.name AS customer_name,\r\n ords.order_id AS order_id,\r\n SUM(order_items.price * order_items.qty) AS total_amount\r\nFROM\r\n customers c\r\nLATERAL VIEW EXPLODE(c.orders) o AS ords\r\nLATERAL VIEW EXPLODE(ords.items) i AS order_items\r\nGROUP BY c.id, c.name, ords.order_id;",
- "type":0,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Top salary",
- "desc":"Top salary 2007 above $100k",
- "type":"1",
- "data":{
- "query":{
- "query":"SELECT sample_07.description, sample_07.salary\r\nFROM\r\n sample_07\r\nWHERE\r\n( sample_07.salary > 100000)\r\nORDER BY sample_07.salary DESC\r\nLIMIT 1000",
- "type":1,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Salary growth",
- "desc":"Salary growth (sorted) from 2007-08",
- "type":"1",
- "data":{
- "query":{
- "query":"SELECT s07.description, s07.salary, s08.salary,\r\n s08.salary - s07.salary\r\nFROM\r\n sample_07 s07 JOIN sample_08 s08\r\nON ( s07.code = s08.code)\r\nWHERE\r\n s07.salary < s08.salary\r\nORDER BY s08.salary-s07.salary DESC\r\nLIMIT 1000",
- "type":1,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Job loss",
- "desc":"Job loss among the top earners 2007-08",
- "type":"1",
- "data":{
- "query":{
- "query":"SELECT s07.description, s07.total_emp, s08.total_emp, s07.salary\r\nFROM\r\n sample_07 s07 JOIN \r\n sample_08 s08\r\nON ( s07.code = s08.code )\r\nWHERE\r\n( s07.total_emp > s08.total_emp\r\n AND s07.salary > 100000 )\r\nORDER BY s07.salary DESC\nLIMIT 1000",
- "type":0,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- },
- {
- "name":"Sample: Customers",
- "desc":"Email Survey Opt-Ins, Customers for Shipping ZIP Code, Total Amount per Order",
- "type":"1",
- "data":{
- "query":{
- "query": "-- Get email survey opt-in values for all customers \nSELECT\r\n c.id,\r\n c.name,\r\n c.email_preferences.categories.surveys\r\nFROM customers c;\n\n\n\n-- Select customers for a given shipping ZIP Code\nSELECT\r\n c.id,\r\n c.name\r\nFROM customers c, c.addresses a\r\nWHERE a.key = 'shipping' and a.zip_code = '76710';\n\n\n\n-- Compute total amount per order for all customers\nSELECT\r\n c.id AS customer_id,\r\n c.name AS customer_name,\r\n o.order_id,\r\n v.total\r\nFROM\r\n customers c,\r\n c.orders o,\r\n (SELECT SUM(price * qty) total FROM o.items) v;",
- "type":1,
- "email_notify":false,
- "is_parameterized":false,
- "database":"default"
- },
- "functions":[ ],
- "VERSION":"0.4.1",
- "file_resources":[ ],
- "settings":[ ]
- }
- }
- ]
|