redshiftTableauQueries.6.sql Maven / Gradle / Ivy
SELECT SUM(("lineitem"."l_extendedprice" * "lineitem"."l_discount")) AS "sum_calculation_8100805085146752_ok"
FROM "tpch10g"."lineitem" "lineitem"
WHERE ((("lineitem"."l_discount" >= 0.05) AND ("lineitem"."l_discount" <= 0.07)) AND ("lineitem"."l_quantity" <= 23.00) AND (("lineitem"."l_shipdate" >= DATEADD(YEAR,0,CAST(DATE_TRUNC( 'YEAR', CAST((TIMESTAMP '1994-01-01 00:00:00.000') AS TIMESTAMP WITHOUT TIME ZONE) ) AS TIMESTAMP WITHOUT TIME ZONE))) AND ("lineitem"."l_shipdate" < DATEADD(YEAR,1,CAST(DATE_TRUNC( 'YEAR', CAST((TIMESTAMP '1994-01-01 00:00:00.000') AS TIMESTAMP WITHOUT TIME ZONE) ) AS TIMESTAMP WITHOUT TIME ZONE)))))
HAVING (COUNT(1) > 0)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy