Created
September 16, 2020 14:37
-
-
Save nagoodman/4603b87d7f8960899937eb88d127431f to your computer and use it in GitHub Desktop.
Happy SNOW day!
This file contains hidden or 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
* SnowSQL * v1.1.86 | |
Type SQL statements or !help | |
SNOWACE#NGOODMAN_WH@HAPPY_IPO_DAY.PUBLIC>select * from table(happy_snow_day()); | |
+---------------------------------------------------------------------------------+ | |
| HAPPY_IPO_DAY_SEPTEMBER_16_2020 | | |
|---------------------------------------------------------------------------------| | |
| ███╗ ██╗██╗ ██╗███████╗███████╗ ███████╗███╗ ██╗ ██████╗ ██╗ ██╗ | | |
| ████╗ ██║╚██╗ ██╔╝██╔════╝██╔════╝██╗ ██╔════╝████╗ ██║██╔═══██╗██║ ██║ | | |
| ██╔██╗ ██║ ╚████╔╝ ███████╗█████╗ ╚═╝ ███████╗██╔██╗ ██║██║ ██║██║ █╗ ██║ | | |
| ██║╚██╗██║ ╚██╔╝ ╚════██║██╔══╝ ██╗ ╚════██║██║╚██╗██║██║ ██║██║███╗██║ | | |
| ██║ ╚████║ ██║ ███████║███████╗╚═╝ ███████║██║ ╚████║╚██████╔╝╚███╔███╔╝ | | |
| ╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚══════╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚══╝╚══╝ | | |
| | | |
+---------------------------------------------------------------------------------+ | |
7 Row(s) produced. Time Elapsed: 1.524s |
This file contains hidden or 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
CREATE OR REPLACE FUNCTION "HAPPY_SNOW_DAY"() | |
RETURNS TABLE (HAPPY_IPO_DAY_SEPTEMBER_16_2020 varchar) | |
LANGUAGE JAVASCRIPT | |
AS | |
$$ | |
{ | |
finalize: function f(rowWriter, context) { | |
var result = []; | |
result.push( "███╗ ██╗██╗ ██╗███████╗███████╗ ███████╗███╗ ██╗ ██████╗ ██╗ ██╗"); | |
result.push( "████╗ ██║╚██╗ ██╔╝██╔════╝██╔════╝██╗ ██╔════╝████╗ ██║██╔═══██╗██║ ██║"); | |
result.push( "██╔██╗ ██║ ╚████╔╝ ███████╗█████╗ ╚═╝ ███████╗██╔██╗ ██║██║ ██║██║ █╗ ██║"); | |
result.push( "██║╚██╗██║ ╚██╔╝ ╚════██║██╔══╝ ██╗ ╚════██║██║╚██╗██║██║ ██║██║███╗██║"); | |
result.push( "██║ ╚████║ ██║ ███████║███████╗╚═╝ ███████║██║ ╚████║╚██████╔╝╚███╔███╔╝"); | |
result.push( "╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚══════╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚══╝╚══╝ "); | |
result.push( " "); | |
result.forEach (function (x) { rowWriter.writeRow({HAPPY_IPO_DAY_SEPTEMBER_16_2020:x}) }); | |
}, | |
processRow: function f(row, rowWriter, context) { | |
} | |
} | |
$$ | |
; | |
select * from table(happy_snow_day()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment