Skip to content

Tag: sql

UNPIVOT Holiday Hours

I have a table, that keeps track of store holiday hours: This is a highly oversimplified table. There’s about 30 columns horzontially consisting of store operating hours by date – It continues (DATE3, TIMES3, DATE4, TIMES4, etc). I need to unpivot the values vertically, ensuring the date and time …

Find missing entries by date

I have two redshift tables: alert_type: where i keep types of alerts in my system alert: where i keep alerts Every day I generate a new alert for each alert type. If something has failed in …