Skip to content
Advertisement

Tag: snowflake-sql

SQL to append records

I have two tables tbl1 and tbl2. Consider tbl2 as the main set and tbl1 has been derived from other sources but will essentially now be a subset of tbl2. tbl1 cd productcd type 1 1 A 1 2 AB 1 3 A 2 3 AB 2 4 AC 3 1 A tbl2 cd productcd type priority 1 1 A

SQL 30 day active user query

I have a table of users and how many events they fired on a given date: DATE USERID EVENTS 2021-08-27 1 5 2021-07-25 1 7 2021-07-23 2 3 2021-07-20 3 9 2021-06-22 1 9 2021-05-05 1 4 2021-05-05 2 2 2021-05-05 3 6 2021-05-05 4 8 2021-05-05 5 1 I want to create a table showing number of active users

Advertisement