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
-- Reference: https://community.periscopedata.com/t/18wkh8/generate-series-of-dates-in-snowflake | |
-- Documentation of SEQx(): https://docs.snowflake.net/manuals/sql-reference/functions/seq1.html | |
-- Since SEQx() does not guarantee gap-free sequence, row_number() needs to be used on top of SEQx() | |
SELECT activity_date, calendar, COUNT(1) | |
FROM table1 AS t1 | |
RIGHT JOIN (SELECT row_number() OVER (ORDER BY SEQ4()) AS days | |
, TO_DATE(DATEADD(day, days, '2019-05-01')) AS calendar | |
FROM TABLE(GENERATOR(rowcount=>80))) | |
ON t1.activity_date = calendar | |
GROUP BY 1, 2 |
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
# Find out what's the recommended driver | |
ubuntu-drivers devices | |
# Install the driver | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt install nvidia-driver-396 | |
# If system stays hanging while booting, change the grub default parameters | |
sudo vim /etc/default/grub |