conditional-aggregation Questions

2

Solved

Let us have the following data IF OBJECT_ID('dbo.LogTable', 'U') IS NOT NULL DROP TABLE dbo.LogTable SELECT TOP 100000 DATEADD(day, ( ABS(CHECKSUM(NEWID())) % 65530 ), 0) datesent INTO [LogTa...

1

Solved

Postgres have a really useful method called FILTER which doesn't seem to be in Snowflake. In Postgres it works like this: SELECT user_id, MIN(orders.started_at) FILTER (WHERE orders.sequence_in_...

1

Solved

I have the following data structure in my foos table: ----------------------------------------------- | id | bar_id | baz_id | date | value | ----------------------------------------------- | 1 | ...
Chopstick asked 24/12, 2013 at 19:10
1

© 2022 - 2024 — McMap. All rights reserved.