-Original Message-
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
ow...@postgresql.org] On Behalf Of Leonardo M. Ramé
Sent: Monday, March 31, 2014 2:38 PM
To: PostgreSql-general
Subject: [GENERAL] Complex query
Hi, I'm looking for help with this query.
Table
On 31/03/2014 19:38, Leonardo M. Ramé wrote:
Hi, I'm looking for help with this query.
Table Tasks:
IdTask StatusCode StatusName
--
1 R Registered
1 S Started
1 D Dictated
1 F Finished
1
Leonardo M. Ramé-2 wrote
Hi, I'm looking for help with this query.
Table Tasks:
IdTask StatusCode StatusName
--
1 R Registered
1 S Started
1 D Dictated
1 F Finished
1 T
On 2014-03-31 18:48:58 +, Igor Neyman wrote:
-Original Message-
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
ow...@postgresql.org] On Behalf Of Leonardo M. Ramé
Sent: Monday, March 31, 2014 2:38 PM
To: PostgreSql-general
Subject: [GENERAL] Complex query
-Original Message-
From: Leonardo M. Ramé [mailto:l.r...@griensu.com]
Sent: Monday, March 31, 2014 2:56 PM
To: Igor Neyman
Cc: PostgreSql-general
Subject: Re: [GENERAL] Complex query
On 2014-03-31 18:48:58 +, Igor Neyman wrote:
-Original Message-
From: pgsql
Hi, I'm looking for help with this query.
Table Tasks:
IdTask StatusCode StatusName
--
1 R Registered
1 S Started
1 D Dictated
1 F Finished
1 T Transcribed
On 2014-03-31 11:46:28 -0700, David Johnston wrote:
Leonardo M. Ramé-2 wrote
Hi, I'm looking for help with this query.
Table Tasks:
IdTask StatusCode StatusName
--
1 R Registered
1 S Started
1 D
Leonardo M. Ramé-2 wrote
select lag.id, lag.idtask, lag.code, lag.lg from (select idtask, code, id,
lag(code, -1) over () as lg from tasks_test) as lag
First you want to include an ORDER BY in the OVER(...) clause, and probably
a PARTITION BY as well.
Then you move that to a sub-query (for
On 2014-03-31 12:16:53 -0700, David Johnston wrote:
Leonardo M. Ramé-2 wrote
select lag.id, lag.idtask, lag.code, lag.lg from (select idtask, code, id,
lag(code, -1) over () as lg from tasks_test) as lag
First you want to include an ORDER BY in the OVER(...) clause, and probably
a
Hello,
I have a complex query question whose answer I think would help me to
understand subselects and aggregates better. I have a table with four
columns of interest:
id (int primary key), loc_title (varchar null), loc_value (float
null), loc_unit (varchar null)
I want the output
Mike Orr wrote:
I have a complex query question whose answer I think would help me to
understand subselects and aggregates better. I have a table with four
columns of interest:
id (int primary key), loc_title (varchar null), loc_value (float
null), loc_unit (varchar null)
I want the
This works beautifully. Thanks to you and Osvaldo; I learned something
more about querying today. I wasn't so much wanting to learn about
subqueries as to how to do these kinds of queries.
In this case, I'm testing a search routine, and I needed to extract
some possible results to expect. (I
I have a complex query question whose answer I think would help me to
understand subselects and aggregates better. I have a table with four
columns of interest:
id (int primary key), loc_title (varchar null), loc_value (float
null), loc_unit (varchar null)
I want the output columns to be:
(1)
Hi everybody
I have de following table where i can perform two different queries:
select * from precalc where idr(p1, p4, p6, p7, p9, 'HLA-DR7')2; where idr
is a function used to create indicies
and
select * from precalc where p1='S';
Now i would like to perform a query as :
select * from
On Apr 30, 2008, at 11:50 AM, Pau Marc Munoz Torres wrote:
Hi everybody
I have de following table where i can perform two different queries:
select * from precalc where idr(p1, p4, p6, p7, p9, 'HLA-DR7')2;
where idr is a function used to create indicies
Are your indices generated by the
Hello, Colleagues !
I have a table with geographical objects, every object has set of semantic
values. Thus we have object-semantic relation one-to-many. Tables structure
was
objects
id_object | id_semantic
1 2
1 3
1 4
...
n n1
n
--- Ken Tozier [EMAIL PROTECTED] escribió:
I'm working on a query which works as expected when
I leave out one of
the OR tests but when the OR is included, I get
hundreds of
duplicate hits from a table that only contains 39
items. Is there a way
to write the following so that the WHERE
I'm working on a query which works as expected when I leave out one of
the OR tests but when the OR is included, I get hundreds of
duplicate hits from a table that only contains 39 items. Is there a way
to write the following so that the WHERE clause tests for two
possible conditions?
Thanks
Ken Tozier [EMAIL PROTECTED] writes:
When I add the OR clause things go haywire:
SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as
elapsed_time FROM pm_events as a, pm_events as b
WHERE a.event_code='pmcd'
OR a.event_code='pmop'
AND b.event_code='pmcl'
On Oct 25, 2004, at 12:35 AM, Tom Lane wrote:
Ken Tozier [EMAIL PROTECTED] writes:
When I add the OR clause things go haywire:
SELECT a.paginator, a.doc_name, (b.time - pm_events.time) as
elapsed_time FROM pm_events as a, pm_events as b
WHERE a.event_code='pmcd'
OR
20 matches
Mail list logo