Skip to content

Instantly share code, notes, and snippets.

@vvgsrk
Last active June 29, 2020 12:53
Show Gist options
  • Save vvgsrk/862764a2b9946cca80482f924e439c60 to your computer and use it in GitHub Desktop.
Save vvgsrk/862764a2b9946cca80482f924e439c60 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE VIEW db_dev.revenue.fleet_assigner_vw
AS
SELECT
airline_code || LPAD(flight_number, 4, 0) ||
TO_CHAR(depature_date, 'ddMMyyyy') ||
depature_airport ||
arrival_airport ||
flight_cabin ||
booking_class
AS FA_OUT
FROM
db_dev.revenue.od_forecast_booking_stream;
SELECT * FROM db_dev.revenue.fleet_assigner_vw;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment