mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-20 09:54:19 +01:00
31 lines
535 B
SQL
31 lines
535 B
SQL
-- LIMBO_SKIP: subquery in where not supported
|
|
|
|
|
|
select
|
|
ps_partkey,
|
|
sum(ps_supplycost * ps_availqty) as value
|
|
from
|
|
partsupp,
|
|
supplier,
|
|
nation
|
|
where
|
|
ps_suppkey = s_suppkey
|
|
and s_nationkey = n_nationkey
|
|
and n_name = 'ARGENTINA'
|
|
group by
|
|
ps_partkey having
|
|
sum(ps_supplycost * ps_availqty) > (
|
|
select
|
|
sum(ps_supplycost * ps_availqty) * 0.0001000000
|
|
from
|
|
partsupp,
|
|
supplier,
|
|
nation
|
|
where
|
|
ps_suppkey = s_suppkey
|
|
and s_nationkey = n_nationkey
|
|
and n_name = 'ARGENTINA'
|
|
)
|
|
order by
|
|
value desc;
|