All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redshiftTableauQueries.1.sql Maven / Gradle / Ivy

SELECT "lineitem"."l_linestatus" AS "l_linestatus",
  "lineitem"."l_returnflag" AS "l_returnflag",
  AVG(CAST("lineitem"."l_discount" AS DOUBLE PRECISION)) AS "avg_l_discount_ok",
  AVG(CAST("lineitem"."l_extendedprice" AS DOUBLE PRECISION)) AS "avg_l_extendedprice_ok",
  AVG(CAST("lineitem"."l_quantity" AS DOUBLE PRECISION)) AS "avg_l_quantity_ok",
  SUM((("lineitem"."l_extendedprice" * (1 - "lineitem"."l_discount")) * (1 + "lineitem"."l_tax"))) AS "sum_calculation_4310711085325373_ok",
  SUM(("lineitem"."l_extendedprice" * (1 - "lineitem"."l_discount"))) AS "sum_calculation_7060711085256495_ok",
  SUM(1) AS "sum_number_of_records_ok",
  SUM("lineitem"."l_extendedprice") AS "sum_l_extendedprice_ok",
  SUM("lineitem"."l_quantity") AS "sum_l_quantity_ok"
FROM "tpch10g"."lineitem" "lineitem"
WHERE ("lineitem"."l_shipdate" <= DATEADD(DAY,(-90),CAST((DATE '1998-12-01') AS TIMESTAMP WITHOUT TIME ZONE)))
GROUP BY 1,
  2




© 2015 - 2025 Weber Informatics LLC | Privacy Policy