I understand that a database lives inside a schema, but I\'m working with an existing design. My old query which targeted postgres is below. I want to recreate it for Redshift.