Galvanize - Galvanize
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
//visualMetaData | |
{ | |
"schemaName":"ecommerce", | |
"tableName":"ecommerce", | |
"selectFields":[ | |
{"column":"metro_region","aggregator":null}, | |
{"column":"sessions","aggregator":"SUM"}, | |
{"column":"transactions","aggregator":"SUM"}, | |
{"column":"transaction_revenue","aggregator":"SUM"}, | |
{"column":"datehour","aggregator":null} |
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
SELECT | |
cast(MAIN.metro_region as string) as __metro_region__, | |
cast(FORMAT("%'d",SUM(MAIN.sessions)) as string) as __sessions__, | |
cast(FORMAT("%'d",SUM(MAIN.transactions)) as string) as __transactions__, | |
cast(CONCAT("$", format("%'.2f",SUM(MAIN.transaction_revenue))) as string) as __transaction_revenue__,FORMAT_DATE("%m/%d/%Y", date(MAIN.datehour) ) as __datehour__ | |
FROM ecommerce.ecommerce as MAIN, | |
(SELECT SUM(transactions) as sum1 , metro_region FROM ecommerce.ecommerce WHERE date(datehour) >= DATE_ADD(CURRENT_DATE, INTERVAL -7 DAY) AND date(datehour) <> CURRENT_DATE GROUP BY metro_region) as SUB1 | |
WHERE ( (MAIN.sessions >= 10) or (MAIN.transactions > 5) ) | |
AND date(MAIN.datehour) = DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY) | |
AND (MAIN.metro_region = SUB1.metro_region) |
Atom is a great code editor that has a lot of really great packages. I recommend the emmet
package for writing JSX with autocomplete.
To set it up go to Atom -> Preferences -> Install:
- Install
emmet
package in atom. - Install
language-babel
package in atom. - Go to Atom -> Keymap...
- Paste the following code at the bottom of the page: