redshiftTableauQueries.8.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 "N2"."n_name" AS "n_name",
CAST(EXTRACT(YEAR FROM CAST("orders"."o_orderdate" AS TIMESTAMP WITHOUT TIME ZONE)) AS INTEGER) AS "yr_o_orderdate_ok",
SUM(("lineitem"."l_extendedprice" * (1 - "lineitem"."l_discount"))) AS "sum_calculation_7060711085256495_ok"
FROM "tpch10g"."lineitem" "lineitem"
INNER JOIN "tpch10g"."orders" "orders" ON ("lineitem"."l_orderkey" = "orders"."o_orderkey")
INNER JOIN "tpch10g"."supplier" "supplier" ON ("lineitem"."l_suppkey" = "supplier"."s_suppkey")
INNER JOIN "tpch10g"."customer" "customer" ON ("orders"."o_custkey" = "customer"."c_custkey")
INNER JOIN "tpch10g"."nation" "N2" ON ("supplier"."s_nationkey" = "N2"."n_nationkey")
INNER JOIN "tpch10g"."nation" "N1" ON ("customer"."c_nationkey" = "N1"."n_nationkey")
INNER JOIN "tpch10g"."region" "region" ON ("N1"."n_regionkey" = "region"."r_regionkey")
INNER JOIN "tpch10g"."part" "part" ON ("lineitem"."l_partkey" = "part"."p_partkey")
WHERE ((("orders"."o_orderdate" >= (DATE '1995-01-01')) AND ("orders"."o_orderdate" <= (DATE '1996-12-31'))) AND ("part"."p_type" = 'ECONOMY ANODIZED STEEL') AND ("region"."r_name" = 'AMERICA'))
GROUP BY 1,
2
© 2015 - 2025 Weber Informatics LLC | Privacy Policy