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

redshiftTableauQueries.4.sql Maven / Gradle / Ivy

There is a newer version: 0.5.8
Show newest version
SELECT "orders"."o_orderpriority" AS "o_orderpriority",
  COUNT(DISTINCT "orders"."o_orderkey") AS "ctd_o_orderkey_ok"
FROM "tpch10g"."lineitem" "lineitem"
  INNER JOIN "tpch10g"."orders" "orders" ON ("lineitem"."l_orderkey" = "orders"."o_orderkey")
WHERE (("lineitem"."l_commitdate" < "lineitem"."l_receiptdate") AND (("orders"."o_orderdate" >= DATEADD(MONTH,0,CAST(DATE_TRUNC( 'MONTH', CAST((TIMESTAMP '1993-07-01 00:00:00.000') AS TIMESTAMP WITHOUT TIME ZONE) ) AS TIMESTAMP WITHOUT TIME ZONE))) AND ("orders"."o_orderdate" < DATEADD(MONTH,3,CAST(DATE_TRUNC( 'MONTH', CAST((TIMESTAMP '1993-07-01 00:00:00.000') AS TIMESTAMP WITHOUT TIME ZONE) ) AS TIMESTAMP WITHOUT TIME ZONE)))))
GROUP BY 1




© 2015 - 2025 Weber Informatics LLC | Privacy Policy