redshiftTableauQueries.4.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of verdictdb-core Show documentation
Show all versions of verdictdb-core Show documentation
Platform-independent, interactive-speed data analytics system
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