pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Muntes Mutero <vmuntes@ac.upc.es>
To: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: TPCH questions
Date: Thu, 15 Feb 2001 09:48:17 +0100
Message-ID: <3A8B97D1.41C6@ac.upc.es> (raw)

Hello,

we have got a problem when executing some queries of tpch benchmark on
PostgreSQL.

For instance, the postgres parser do not accept the syntax of the query
number 9:


select  nation2 , o_year, sum(amount) as sum_profit
from
        (
                select
                        n_name as nation2,
                        extract(year from o_orderdate) as o_year,
                        l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as
amount
                from
                        part,
                        supplier,
                        lineitem,
                        partsupp,
                        orders,
                        nation
                where
                        s_suppkey = l_suppkey
                        and ps_suppkey = l_suppkey
                        and ps_partkey = l_partkey
                        and p_partkey = l_partkey
                        and o_orderkey = l_orderkey
                        and s_nationkey = n_nationkey
                        and p_name like '%green%'
        ) as profit
group by
        nation2,
        o_year
order by
        nation2,
        o_year desc;


Postgres returns the following message: 

ERROR:  parser: parse error at or near "select"


We have tried to solve the problem and we have seen that simplifying,
the real problem shows up when trying to solve a query like this one:

select * from (select * from supplier); (for example)


What's the problem? 

We've heard about some variants of TPCH queries, do you know if there is
any of these which could solve our problem?

Thanks in advance,

Victor Muntes
Pep Aguilar



view thread (3+ messages)  latest in thread

Message-ID: <3A8B97D1.41C6@ac.upc.es>
Permalink:  ../3A8B97D1.41C6@ac.upc.es/
Also on:    postgresql.org/message-id/3A8B97D1.41C6@ac.upc.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: vmuntes@ac.upc.es, pgsql-general@postgresql.org, pgsql-admin@postgresql.org
  Subject: Re: TPCH questions
  In-Reply-To: <3A8B97D1.41C6@ac.upc.es>
  References: <3A8B97D1.41C6@ac.upc.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox