Mike Winter writes:
> My query is of the form:
> SELECT col, count(col) FROM tab WHERE id IN (3,
> 4,7,2, ...) GROUP BY COL ORDER BY count
> for a very large number of rows.
> I have an index on id, so the explain looks like:
> Aggregate (cost=12.12..12.14 rows=1 width=5)
> -> Group (cost=1
On Mon, 2 Dec 2002, Raymond Chui wrote:
> I created a column, dada type timstamp with time zone
> and with default CURRENT_TIMSTAMP
> it shows me the default is
>
> default ('now'::text)::timstamp(6) with time zone
>
> Then when I insert a row, the default timestamp value is
>
> -mm-dd HH:MM:s
If you do not mind non standard, how about:
SELECT DISTINCT ON(id_father) * FROM children ORDER BY id_father,
child_age;
Dennis Björklund wrote:
>
> On 29 Nov 2002, Sergio Oshiro wrote:
>
> > How can I get the rows of the children name and its "father" such that
> > they have the min child_age
On Mon, Dec 02, 2002 at 01:46:38PM -0500, Casey Allen Shobe wrote:
> Hi there,
>
> I need to do the following in one SQL query:
>
> select field1, field2, field3, field4, field5 from table where field6 < 5
> order by field1
>
> And a totals line which shows the sum for each column.
>
> The impo
On Sat, Nov 30, 2002 at 02:40:08PM -0800, Benjamin Smith wrote:
> Let's say you have a table of Financial transactions:
>
> Create table checks (
> id serial,
> number varchar,
> to varchar,
> amount real,
> date integer
> );
>
> (date is an epoch timestamp)
>
> And you want to get a li
Hi there,
I need to do the following in one SQL query:
select field1, field2, field3, field4, field5 from table where field6 < 5
order by field1
And a totals line which shows the sum for each column.
The important part is that I need to preserve the order by of the first query.
Is there any wa
On Fri, Nov 29, 2002 at 10:55:54AM -0800, Sergio Oshiro wrote:
> Hello, everybody!
>
> I've trouble to make a "simple"(?) query...
>
> The following table is an example:
>
> table: children
> id_father | child_name | child_age
> --++
> 1 | John | 2
>
On 29 Nov 2002, Sergio Oshiro wrote:
> How can I get the rows of the children name and its "father" such that
> they have the min child_ages?
>
> -- the following does not return the child_name...
> select id_father, min(child_age) from children group by id_father;
> select id_father, max(child_a
On Mon, Dec 02, 2002 at 11:41:33AM -0500, Raymond Chui wrote:
> I created a column, dada type timstamp with time zone
> and with default CURRENT_TIMSTAMP
> it shows me the default is
>
> default ('now'::text)::timstamp(6) with time zone
>
> Then when I insert a row, the default timestamp value is
Hello, everybody!
I've trouble to make a "simple"(?) query...
The following table is an example:
table: children
id_father | child_name | child_age
--++
1 | John | 2
1 | Joe| 3
1 | Mary | 4
1 | Cristine | 4
I created a column, dada type timstamp with time zone
and with default CURRENT_TIMSTAMP
it shows me the default is
default ('now'::text)::timstamp(6) with time zone
Then when I insert a row, the default timestamp value is
-mm-dd HH:MM:ss.m+00
where m is milliseconds.
How do I make d
Hi there!
Can anybody explain behavior of ?
Or give a link where explanation can be found?
Or something like that ?:)
To my regret, i can't figure it out
right from SQL standard description with my "brute force".
regards,
---
.evgen
---(end of broadcast)---
Let's say you have a table of Financial transactions:
Create table checks (
id serial,
number varchar,
to varchar,
amount real,
date integer
);
(date is an epoch timestamp)
And you want to get a listing of checks
"SELECT * FROM checks ORDER BY date ASC";
but you also want to have an
Respected sir,
Atul Pedgaonkar here from india. I am using postgresql7.2 as
backend and for front-end ,perl5.6.1. I need some help regarding postgresql
stored procedure. The problem is like this
1)How to create stored procedure in postgresql ?
2)How can i use it from
Hi all, I hope someone can help me out.
I'm doing single-table select statements on a large table and I could use
some help in speeding it up.
My query is of the form:
SELECT col, count(col) FROM tab WHERE id IN (3,
4,7,2, ...) GROUP BY COL ORDER BY count
for a very large number of rows.
I have
On Monday 02 Dec 2002 8:42 am, Andreas Joseph Krogh wrote:
> On Monday 02 December 2002 09:44, Atul wrote:
> > Respected sir,
> > Atul Pedgaonkar here from India. I am using postgresql7.2 as
> > backend and for front-end, perl5.6.1. I need some help regarding
> > postgresql-stored proc
On Monday 02 December 2002 09:44, Atul wrote:
> Respected sir,
> Atul Pedgaonkar here from India. I am using postgresql7.2 as
> backend and for front-end, perl5.6.1. I need some help regarding
> postgresql-stored procedure. The problem is like this
>
> 1)How to create stored pr
Respected sir,
Atul Pedgaonkar here from India. I am using postgresql7.2 as backend and for
front-end, perl5.6.1. I need some help regarding postgresql-stored procedure.
The problem is like this
1)How to create stored procedure
in postgresql?
2)How can i use
18 matches
Mail list logo