You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select
p_brand,
p_type,
p_size,
count(distinct ps_suppkey) as supplier_cnt
fromdata.tpch.partsupp,
data.tpch.part
where
p_partkey = ps_partkey
and p_brand <>'Brand#34'and p_type not like'ECONOMY BRUSHED%'and p_size in (22, 14, 27, 49, 21, 33, 35, 28)
andpartsupp.ps_suppkey not in (
select
s_suppkey
fromdata.tpch.supplier
where
s_comment like'%Customer%Complaints%'
)
group by
p_brand,
p_type,
p_size
order by
supplier_cnt desc,
p_brand,
p_type,
p_size;
The table is called data.tpch.partsupp, which isn't known as partsupp when referenced as partsupp.ps_suppkey
The text was updated successfully, but these errors were encountered:
There is a problem with the way we handle aliases and relation names, we appear to decide that a relation can an internal canonical name and all references must be to that name. This is generally how people write queries but it fails when we have implied aliases (e.g. sqlite.planets => [sqlite.planets, planets]). Because the relation has one and only one canonical name, we don't know these are actually the same relation.
We are going to need to handle this situation. We will need to deal with situations where two relations have the same implied alias, this should never happen for the exact same table as the ambiguity check will catch it, but relations in different name spaces can have collisions (e.g. sqlite.planets, datastax.planets)
The table is called
data.tpch.partsupp
, which isn't known aspartsupp
when referenced aspartsupp.ps_suppkey
The text was updated successfully, but these errors were encountered: