Hot Ones, LEGO Movie Edition
Clearing a Data Extension with a SQL Query
If you ever need an automated way to clear a data extension, you can simply use a SQL query that does an overwrite. The query doesn’t need a from clause if you specify any required columns in the target.
For example, if EmailAddress is required in the target data extension, simply set the value to null and add an alias:
Journey – Separate Ways (Worlds Apart), Musicless
Giannis
Picking rows with partitions
I’m constantly faced with situations with data in Salesforce Marketing Cloud where I need to select or identify rows based on some ordered criteria. The row_number() over (partition by x order by y) as ranking is my go-to method.
This particular query finds a random row for each bounce category in the _bounce data view:
Recently, found this shorter method:
Credit @TheGameiswar