redshiftTableauQueries.17.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 SUM("lineitem"."l_extendedprice") AS "temp_calculation_7921031152254526__1602391293__0_"
FROM "tpch10g"."lineitem" "lineitem"
INNER JOIN "tpch10g"."part" "part" ON ("lineitem"."l_partkey" = "part"."p_partkey")
INNER JOIN (
SELECT AVG(CAST("lineitem"."l_quantity" AS DOUBLE PRECISION)) AS "__measure__0",
"lineitem"."l_partkey" AS "l_partkey"
FROM "tpch10g"."lineitem" "lineitem"
WHERE (NOT ("lineitem"."l_partkey" IS NULL))
GROUP BY 2
) "t0" ON (("lineitem"."l_partkey" = "t0"."l_partkey") OR (("lineitem"."l_partkey" IS NULL) AND ("t0"."l_partkey" IS NULL)))
WHERE (("lineitem"."l_quantity" < (0.20000000000000001 * "t0"."__measure__0")) AND ("part"."p_brand" = 'Brand#23') AND ("part"."p_container" = 'MED BOX'))
HAVING (COUNT(1) > 0)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy